summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2014-05-10 00:40:54 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2014-05-10 00:40:54 +0000
commit4856a67b510b2c50b5d2f1e3afa204ae22dca554 (patch)
tree5e2ef2d042af66137d1e8367bfd7a34824b5f135
parent8b547a338373b6e149d8ceed34bbf6a979a1e10d (diff)
Check exception specification with __cplusplus.
To allow the compilation with gcc, we can't use the __has_feature(cxx_noexcept) to detect the default destructor exception specification, which is noexcept(true) by default in C++11. We should use __cplusplus >= 201103L instead. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@208465 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/test_vector1.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_vector1.cpp b/test/test_vector1.cpp
index 29d39db..b8bf45c 100644
--- a/test/test_vector1.cpp
+++ b/test/test_vector1.cpp
@@ -49,7 +49,7 @@ int gDestructorThrowTarget;
void throw_construct ( void *p ) { if ( gConstructorCounter == gConstructorThrowTarget ) throw 1; ++gConstructorCounter; }
void throw_destruct ( void *p ) { if ( ++gDestructorCounter == gDestructorThrowTarget ) throw 2; }
-#if __has_feature(cxx_noexcept)
+#if __cplusplus >= 201103L
# define CAN_THROW noexcept(false)
#else
# define CAN_THROW