diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-07-10 11:27:46 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-07-10 11:27:46 -0400 |
commit | e04e7c0d9021ad1b3a9eee932c65a2d3cf68c6bd (patch) | |
tree | 384aa7fbc77cd97e6ace302871e00fb27fa135a1 /cpp | |
parent | Fixed bogus synchronization in ConnectionI.asyncRequestTimedOut (diff) | |
download | ice-e04e7c0d9021ad1b3a9eee932c65a2d3cf68c6bd.tar.bz2 ice-e04e7c0d9021ad1b3a9eee932c65a2d3cf68c6bd.tar.xz ice-e04e7c0d9021ad1b3a9eee932c65a2d3cf68c6bd.zip |
Partial fix for ICE-5548: better C++11 detection
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/IceUtil/Config.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index b7b574a719f..e789196589c 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -50,23 +50,17 @@ // // Check for C++ 11 support // -// We cannot just check for C++11 mode as some features were not -// implemented in first versions of the compilers. +// 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. // -// The require compiler version should be equal or greater than -// VC100, G++ 4.5, Clang Apple 4.2 or Clang 3.2 (Unsupported). -// -#if (defined(__GNUC__) && (((__GNUC__* 100) + __GNUC_MINOR__) >= 405) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \ - (defined(__clang__) && \ - ((defined(__apple_build_version__) && (((__clang_major__ * 100) + __clang_minor__) >= 402)) || \ - (!defined(__apple_build_version__) && (((__clang_major__ * 100) + __clang_minor__) >= 302))) && \ - __cplusplus >= 201103) || \ +#if (__cplusplus >= 201103) || \ + ((defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) && ((__GNUC__* 100) + __GNUC_MINOR__) >= 405)) || \ (defined(_MSC_VER) && (_MSC_VER >= 1600)) # define ICE_CPP11 #endif -#if defined(ICE_CPP11) && !defined(_MSC_VER) +#if defined(ICE_CPP11) && !defined(_MSC_VER) // Visual Studio does not support noexcept yet # define ICE_NOEXCEPT noexcept # define ICE_NOEXCEPT_FALSE noexcept(false) @@ -117,6 +111,9 @@ (defined(__HP_aCC) && defined(__HP_WINDLL)) # define ICE_DECLSPEC_EXPORT __declspec(dllexport) # define ICE_DECLSPEC_IMPORT __declspec(dllimport) +// +// ICE_HAS_DECLSPEC_IMPORT_EXPORT defined only for compilers with distinct +// declspec for IMPORT and EXPORT # define ICE_HAS_DECLSPEC_IMPORT_EXPORT #elif defined(__GNUC__) # define ICE_DECLSPEC_EXPORT __attribute__((visibility ("default"))) |