throw e;
}
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
ImpossibleError::~ImpossibleError() = default;
InitializationError::~InitializationError() = default;
XBT_ATTRIB_NORETURN static void handler()
{
// Avoid doing crazy things if we get an uncaught exception inside an uncaught exception
- static std::atomic_flag lock = ATOMIC_FLAG_INIT;
- if (lock.test_and_set()) {
+ if (static std::atomic_flag lock = ATOMIC_FLAG_INIT; lock.test_and_set()) {
XBT_ERROR("Handling an exception raised an exception. Bailing out.");
std::abort();
}
});
}
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
void xbt_throw_impossible(const char* file, int line, const char* func)
{