Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update python/clusters-multicpu to the new API.
[simgrid.git] / examples / cpp / network-ns3 / s4u-network-ns3.cpp
index a8a7f9db66c4b8df9337a48ffaa87b82d12d6f0b..e1c8b39399b01ab77856a616755837d7c4108934 100644 (file)
@@ -32,7 +32,7 @@ static void master(MasterWorkerNamesMap& names, const std::vector<std::string>&
   int id          = std::stoi(args[3]); // unique id to control statistics
 
   /* master and worker names */
-  names.emplace(id, MasterWorkerNames{sg4::Host::current()->get_name(), args[2]});
+  names.try_emplace(id, MasterWorkerNames{sg4::Host::current()->get_name(), args[2]});
 
   sg4::Mailbox* mbox = sg4::Mailbox::by_name(args[3]);