-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
{
void* mem;
smpi_source_location loc(file, line);
- auto res = allocs.insert(std::make_pair(loc, shared_data_t()));
+ auto res = allocs.try_emplace(loc);
auto data = res.first;
if (res.second) {
// The new element was inserted.