diff options
-rw-r--r-- | Modules/Compiler/Intel-CXX-FeatureTests.cmake | 6 | ||||
-rw-r--r-- | Tests/CompileFeatures/cxx_generalized_initializers.cpp | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake index 929a7c6..bbefe15 100644 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake @@ -31,11 +31,6 @@ set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel16_CXX14}") set(_cmake_feature_test_cxx_contextual_conversions "${Intel16_CXX14}") set(_cmake_feature_test_cxx_generic_lambdas "__cpp_generic_lambdas >= 201304") set(_cmake_feature_test_cxx_digit_separators "${Intel16_CXX14}") -# This test is supposed to work in Intel 14 but the compiler has a bug -# in versions 14 and 15:: -# https://software.intel.com/en-us/forums/intel-c-compiler/topic/600514 -# It also appears to fail with an internal compiler error on Intel 16 and 17. -#set(_cmake_feature_test_cxx_generalized_initializers "${Intel16_CXX14}") unset(Intel16_CXX14) set(Intel15 "__INTEL_COMPILER >= 1500") @@ -75,6 +70,7 @@ set(_cmake_feature_test_cxx_override "${Intel14_CXX11}") set(_cmake_feature_test_cxx_final "${Intel14_CXX11}") set(_cmake_feature_test_cxx_noexcept "${Intel14_CXX11}") set(_cmake_feature_test_cxx_defaulted_move_initializers "${Intel14_CXX11}") +set(_cmake_feature_test_cxx_generalized_initializers "${Intel14_CXX11}") unset(Intel14_CXX11) set(Intel13_CXX11 "__INTEL_COMPILER >= 1300 && ${DETECT_CXX11}") diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp index cfe9d98..0df0a33 100644 --- a/Tests/CompileFeatures/cxx_generalized_initializers.cpp +++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp @@ -11,11 +11,17 @@ class initializer_list const _E* __begin_; size_t __size_; +#ifdef __INTEL_COMPILER + // The Intel compiler internally asserts the constructor overloads, so + // reproduce the constructor used in its <initializer_list> header. + initializer_list(const _E*, size_t) {} +#else public: template <typename T1, typename T2> initializer_list(T1, T2) { } +#endif }; } |