-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2021. 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. */
simgrid::s4u::this_actor::sleep_for(2);
while (true) { // I am an eternal emigrant
- auto destination = std::unique_ptr<std::string>(static_cast<std::string*>(mailbox->get()));
+ auto destination = mailbox->get_unique<std::string>();
if (destination->empty())
break; // there is no destination, die
simgrid::s4u::this_actor::set_host(simgrid::s4u::Host::by_name(*destination));