diff options
author | Bernard Normier <bernard@zeroc.com> | 2018-09-24 11:43:01 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2018-09-24 11:43:01 -0400 |
commit | 8e7a335426783b39110df7de35ed55b29f8e2608 (patch) | |
tree | cc12085c23345f422c94d603d23738d6605dabcc /cpp/include | |
parent | Reworked clang -Wdocumentation warning suppression. Fixes #209. (diff) | |
download | ice-8e7a335426783b39110df7de35ed55b29f8e2608.tar.bz2 ice-8e7a335426783b39110df7de35ed55b29f8e2608.tar.xz ice-8e7a335426783b39110df7de35ed55b29f8e2608.zip |
Reworked C++11 compiler check. Fixes #206.
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/IceUtil/Config.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index 48163dd96ab..be1ab674324 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -97,13 +97,19 @@ # endif #endif +#if defined(_MSVC_LANG) +# define ICE_CPLUSPLUS _MSVC_LANG +#else +# define ICE_CPLUSPLUS __cplusplus +#endif + // // Check for C++ 11 support // // For GCC, we recognize --std=c++0x only for GCC version 4.5 and greater, // as C++11 support in prior releases was too limited. // -#if (__cplusplus >= 201103) || \ +#if (ICE_CPLUSPLUS >= 201103) || \ ((defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) && ((__GNUC__* 100) + __GNUC_MINOR__) >= 405)) || \ (defined(_MSC_VER) && (_MSC_VER >= 1900)) # define ICE_CPP11_COMPILER @@ -116,7 +122,7 @@ # error "you need a C++11 capable compiler to use the C++11 mapping" #endif -#if defined(ICE_CPP11_COMPILER) && (!defined(_MSC_VER) || (_MSC_VER >= 1900)) +#if defined(ICE_CPP11_COMPILER) # define ICE_NOEXCEPT noexcept # define ICE_NOEXCEPT_FALSE noexcept(false) # define ICE_FINAL final @@ -160,12 +166,6 @@ # define ICE_HAS_THREAD_SAFE_LOCAL_STATIC #endif -#if defined(_MSVC_LANG) -# define ICE_CPLUSPLUS _MSVC_LANG -#else -# define ICE_CPLUSPLUS __cplusplus -#endif - // // Compiler extensions to export and import symbols: see the documentation // for Visual Studio, Solaris Studio and GCC. |