From 2edcac4d3958d0096413bccfbd929b3257967fee Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 20 Jan 2016 05:44:11 +0000 Subject: [PATCH] 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 --- test/libcxx/strings/iterators.exceptions.pass.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/libcxx/strings/iterators.exceptions.pass.cpp b/test/libcxx/strings/iterators.exceptions.pass.cpp index f039ced7c..7b7eaba0b 100644 --- a/test/libcxx/strings/iterators.exceptions.pass.cpp +++ b/test/libcxx/strings/iterators.exceptions.pass.cpp @@ -23,6 +23,7 @@ #include #include +#include "test_macros.h" #include "test_iterators.h" int main() @@ -49,12 +50,12 @@ int main() static_assert((!std::__libcpp_string_gets_noexcept_iterator >::value), ""); static_assert((!std::__libcpp_string_gets_noexcept_iterator >::value), ""); -#if __has_feature(cxx_noexcept) +#if TEST_STD_VER >= 11 static_assert(( std::__libcpp_string_gets_noexcept_iterator >::value), ""); #else static_assert((!std::__libcpp_string_gets_noexcept_iterator >::value), ""); #endif - + // // iterators from libc++'s containers //