mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fix warnings about throwing destructors, which are by default noexcept
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <boost/interprocess/detail/intermodule_singleton.hpp>
|
||||
#include <boost/interprocess/detail/portable_intermodule_singleton.hpp>
|
||||
#include <iostream>
|
||||
#include <cstdlib> //for std::abort
|
||||
|
||||
using namespace boost::interprocess;
|
||||
|
||||
@@ -184,7 +185,8 @@ class LogPhoenixTester
|
||||
sstr << "Logger<Tag>::constructed_times != Logger<Tag>::destroyed_times\n";
|
||||
sstr << "(" << Logger<Tag>::constructed_times << " vs. " << Logger<Tag>::destroyed_times << ")\n";
|
||||
}
|
||||
throw std::runtime_error(sstr.str().c_str());
|
||||
std::cout << "~LogPhoenixTester(), error: " << sstr.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -214,7 +216,8 @@ class LogDeadReferenceUser
|
||||
LogSingleton::get().log_it();
|
||||
std::string s("LogDeadReferenceUser failed for LogSingleton ");
|
||||
s += typeid(LogSingleton).name();
|
||||
throw std::runtime_error(s.c_str());
|
||||
std::cout << "~LogDeadReferenceUser(), error: " << s << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
catch(interprocess_exception &){
|
||||
//Correct behaviour
|
||||
|
||||
Reference in New Issue
Block a user