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 <vector>
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "test_iterators.h"
|
#include "test_iterators.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
@@ -49,12 +50,12 @@ int main()
|
|||||||
static_assert((!std::__libcpp_string_gets_noexcept_iterator<random_access_iterator<char *> >::value), "");
|
static_assert((!std::__libcpp_string_gets_noexcept_iterator<random_access_iterator<char *> >::value), "");
|
||||||
static_assert((!std::__libcpp_string_gets_noexcept_iterator<ThrowingIterator <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), "");
|
static_assert(( std::__libcpp_string_gets_noexcept_iterator<NonThrowingIterator <char *> >::value), "");
|
||||||
#else
|
#else
|
||||||
static_assert((!std::__libcpp_string_gets_noexcept_iterator<NonThrowingIterator <char *> >::value), "");
|
static_assert((!std::__libcpp_string_gets_noexcept_iterator<NonThrowingIterator <char *> >::value), "");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// iterators from libc++'s containers
|
// iterators from libc++'s containers
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user