namespace simgrid {
+// DO NOT define destructors for exceptions in Exception.hpp.
+// Defining it here ensures that the exceptions are defined only in libsimgrid, but not in libsimgrid-java.
+// Doing otherwise naturally breaks things (at least on freebsd with clang).
+
+Exception::~Exception() = default;
ForcefulKillException::~ForcefulKillException() = default;
void ForcefulKillException::do_throw()
throw ForcefulKillException();
}
-bool ForcefulKillException::try_n_catch(std::function<void(void)> try_block)
+bool ForcefulKillException::try_n_catch(const std::function<void()>& try_block)
{
bool res;
try {