From 23f59f6b288041882584c586e1327a2860c0894b Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 27 Jul 2015 00:17:41 -0400 Subject: [PATCH] Added tests for Intel compilers. Tightened tests on GCC since the others claim to be GCC, but fail to compile programs that GCC can compile --- config.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index cccdec21..b49635f5 100644 --- a/config.h +++ b/config.h @@ -499,13 +499,16 @@ NAMESPACE_END #if defined(CRYPTOPP_CXX11) // R-values: MS at VS2010 (16.00); GCC at 4.3; Clang at 2.9; and Intel 11.1. +// The extra tests on GCC are because Clang claims to be GCC 4. #if (_MSC_VER >= 1600) # define CRYPTOPP_CXX11_RVALUES 1 #elif defined(__clang__) # if __has_feature(cxx_rvalue_references) # define CRYPTOPP_CXX11_RVALUES 1 # endif -#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) +#elif (__INTEL_COMPILER >= 1110) +# define CRYPTOPP_CXX11_RVALUES 1 +#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) && !defined(__INTEL_COMPILER || __clang__) # define CRYPTOPP_CXX11_RVALUES 1 #endif // R-value compilers @@ -516,8 +519,11 @@ NAMESPACE_END # if __has_feature(cxx_noexcept) # define CRYPTOPP_CXX11_NOEXCEPT 1 # endif -#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#elif (__INTEL_COMPILER >= 1400) +# define CRYPTOPP_CXX11_RVALUES 1 +#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) && !defined(__INTEL_COMPILER || __clang__) # define CRYPTOPP_CXX11_NOEXCEPT 1 +# error #endif // noexcept compilers #if defined(CRYPTOPP_CXX11_NOEXCEPT)