Use TEST_STD_VER instead of __has_feature to detect noexcept. This fixes the test with GCC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258292 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <vector>
|
||||
#include <initializer_list>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include "test_iterators.h"
|
||||
|
||||
int main()
|
||||
@@ -49,7 +50,7 @@ int main()
|
||||
static_assert((!std::__libcpp_string_gets_noexcept_iterator<random_access_iterator<char *> >::value), "");
|
||||
static_assert((!std::__libcpp_string_gets_noexcept_iterator<ThrowingIterator <char *> >::value), "");
|
||||
|
||||
#if __has_feature(cxx_noexcept)
|
||||
#if TEST_STD_VER >= 11
|
||||
static_assert(( std::__libcpp_string_gets_noexcept_iterator<NonThrowingIterator <char *> >::value), "");
|
||||
#else
|
||||
static_assert((!std::__libcpp_string_gets_noexcept_iterator<NonThrowingIterator <char *> >::value), "");
|
||||
|
||||
Reference in New Issue
Block a user