From 3535471723250a31b12a128c31160342787f9dde Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 23 Jan 2016 22:16:14 +0000 Subject: fixed warning due to change of handling of exceptions inside descrutors since C++11 --- src/anytunError.h | 2 +- src/datatypes.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/anytunError.h b/src/anytunError.h index e31fa0e..0505497 100644 --- a/src/anytunError.h +++ b/src/anytunError.h @@ -81,7 +81,7 @@ class ErrorStringBuilder public: ErrorStringBuilder(ErrorStringBuilder const& src) { stream << src.stream.str(); }; ErrorStringBuilder() {}; - ~ErrorStringBuilder() { throw std::runtime_error(stream.str()); }; + ~ErrorStringBuilder() NOEXCEPT(false) { throw std::runtime_error(stream.str()); }; template std::ostream& operator<<(T const& value) { return stream << value; } diff --git a/src/datatypes.h b/src/datatypes.h index bce14dd..85ae9c4 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -48,6 +48,13 @@ #include #include +#include + +#ifndef BOOST_NO_NOEXCEPT +#define NOEXCEPT(x) noexcept(x) +#else +#define NOEXCEPT(x) +#endif // should not be necessary on GCC, #ifdef + #include should do the job; still required on MS VC++9, though. using boost::int8_t; -- cgit v1.2.3