-/* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-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. */
on_communication_state_change.connect(cb);
}
/** @brief Add a callback fired when a Link is destroyed */
- static void on_destruction_cb(std::function<void(Link const&)> cb) { on_destruction.connect(cb); }
+ static void on_destruction_cb(const std::function<void(Link const&)>& cb) { on_destruction.connect(cb); }
};
/**