diff --git a/Changes b/Changes index 3df761b..2fa543f 100644 --- a/Changes +++ b/Changes @@ -15,6 +15,8 @@ TODO: document portability requirements for atomic pointer access TODO: possible cb aliasing? TODO: document requirements for function pointers and calling conventions. + - prfer noexcept over throw () with C++ 11. + 4.19 Thu Sep 25 08:18:25 CEST 2014 - ev.h wasn't valid C++ anymore, which tripped compilers other than clang, msvc or gcc (analyzed by Raphael 'kena' Poss). Unfortunately, diff --git a/ev.h b/ev.h index a831bc7..785a5da 100644 --- a/ev.h +++ b/ev.h @@ -42,12 +42,16 @@ #ifdef __cplusplus # define EV_CPP(x) x +# if __cplusplus >= 201103L +# define EV_THROW noexcept +# else +# define EV_THROW throw () +# endif #else # define EV_CPP(x) +# define EV_THROW #endif -#define EV_THROW EV_CPP(throw()) - EV_CPP(extern "C" {) /*****************************************************************************/