From be063570698505df06c16bb1638b2a5d94cae415 Mon Sep 17 00:00:00 2001 From: Marc Alexander Lehmann Date: Sun, 9 Nov 2014 09:00:16 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 ++ ev.h | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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" {) /*****************************************************************************/