Skip to content

Commit

Permalink
add #define to manage dynamic exception deprecation in c++11/14
Browse files Browse the repository at this point in the history
  • Loading branch information
kdt3rd authored and nickrasmussen committed Aug 8, 2018
1 parent 5f58c94 commit b133b76
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions IlmBase/Iex/IexBaseExc.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@
#include <exception>
#include <sstream>

//----------------------------------------------------------
//
// C++11 deprecates the specification of dynamic exception throw and
// then changes this again in C++17. for convenience, put a macro
// here to enable existing places to specify the exception list, and
// have it done so appropriately based on the language features
// active.
//
//----------------------------------------------------------
#ifdef ILMBASE_FORCE_CXX03
# define IEX_THROW_SPEC(...) throw (__VA_ARGS__)
#else
# if __cplusplus <= 201402L
# define IEX_THROW_SPEC(...)
# else
# define IEX_THROW_SPEC(...) throw (__VA_ARGS__)
# endif
#endif

IEX_INTERNAL_NAMESPACE_HEADER_ENTER


Expand Down

0 comments on commit b133b76

Please sign in to comment.