summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/common/c++11/c++11.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/config.tests/common/c++11/c++11.cpp b/config.tests/common/c++11/c++11.cpp
index a14a26f81e..2c501ad6ca 100644
--- a/config.tests/common/c++11/c++11.cpp
+++ b/config.tests/common/c++11/c++11.cpp
@@ -46,8 +46,12 @@
#endif
#include <utility>
-#if defined(__clang__) && !defined(_LIBCPP_VERSION)
-# error "C++11 with clang requires libc++ runtime"
+#if defined(__clang__)
+# if __has_feature(cxx_generalized_initializers)
+// On Mac OS X, the libstdc++ headers don't include <initializer_list>
+// This #include here forces a failure unless we're using libc++
+# include <initializer_list>
+# endif
#endif
int main(int, char **) { return 0; }