clang: Do not use libstdc++ when C++11 is enabled
We expect that the C++ library also supports C++11 when the compiler says it does as well. When using clang with libstdc++, the library has no C++11 support or headers, so we cannot use, for example, #include <initializer_lists>. Change-Id: I844877107256f15ab314e8f82fe54434dbb07638 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
60f2abff5e
commit
ccf988e510
@ -42,7 +42,12 @@
|
|||||||
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
// Compiler claims to support C++11, trust it
|
// Compiler claims to support C++11, trust it
|
||||||
#else
|
#else
|
||||||
# error "__cplusplus must be >= 201103L"
|
# error "__cplusplus must be >= 201103L, or __GXX_EXPERIMENTAL_CXX0X__ must be defined"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
#if defined(__clang__) && !defined(_LIBCPP_VERSION)
|
||||||
|
# error "C++11 with clang requires libc++ runtime"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int, char **) { return 0; }
|
int main(int, char **) { return 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user