From 952b57fa7df513af5d627b01d733591835af83fc Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 24 Jan 2011 18:28:53 +0000 Subject: [PATCH] Add preliminary C++0x support. Refs #5112. [SVN r68420] --- include/boost/config/compiler/intel.hpp | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index e7bc95ba..854036d3 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -26,7 +26,22 @@ # define BOOST_INTEL_CXX_VERSION __ECC #endif +// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' +#if (BOOST_INTEL_CXX_VERSION >= 1200) +# if defined(BOOST_INTEL_LINUX) && defined(__STDC_HOSTED__) +# define BOOST_INTEL_STDCXX0X +# endif +#elif (BOOST_INTEL_CXX_VERSION >= 1100) +# if defined(__GXX_EXPERIMENTAL_CPP0X__) +# define BOOST_INTEL_STDCXX0X +# endif +#endif + +#ifdef BOOST_INTEL_STDCXX0X +#define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#else #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#endif #define BOOST_INTEL BOOST_INTEL_CXX_VERSION #if defined(_WIN32) || defined(_WIN64) @@ -179,6 +194,23 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #endif +// +// C++0x features +// - ICC added static_assert in 11.0 (first version with C++0x support) +// +#if defined(BOOST_INTEL_STDCXX0X) +# undef BOOST_NO_STATIC_ASSERT +# define BOOST_HAS_STATIC_ASSERT +#endif +// +// - decltype and && did not work properly before version 12.0 +// +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200) +# undef BOOST_NO_DECLTYPE +# undef BOOST_NO_RVALUE_REFERENCES +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_RVALUE_REFS +#endif // // last known and checked version: