summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/re/re.regex
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-04-18 23:42:15 +0000
committerEric Fiselier <eric@efcs.ca>2017-04-18 23:42:15 +0000
commit9f7cc58f81a43d6f6c413e38e51e0ab68e7b71fc (patch)
tree54ce15ac1003e53cb32ed17fa494b1a0521dde60 /libcxx/test/std/re/re.regex
parentf0aca21e094d2a3f14afc9cbe82878d256e40bd1 (diff)
downloadbcm5719-llvm-9f7cc58f81a43d6f6c413e38e51e0ab68e7b71fc.tar.gz
bcm5719-llvm-9f7cc58f81a43d6f6c413e38e51e0ab68e7b71fc.zip
Cleanup _LIBCPP_HAS_NO_<c++11-features> macro usage in regex
llvm-svn: 300627
Diffstat (limited to 'libcxx/test/std/re/re.regex')
-rw-r--r--libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp4
-rw-r--r--libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp4
-rw-r--r--libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp6
3 files changed, 6 insertions, 8 deletions
diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp
index 39c3a22ef72..fcaee8c3d68 100644
--- a/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <regex>
// template <class charT, class traits = regex_traits<charT>> class basic_regex;
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
std::regex r2;
r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'});
assert(r2.flags() == std::regex::ECMAScript);
@@ -30,5 +31,4 @@ int main()
r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex::extended);
assert(r2.flags() == std::regex::extended);
assert(r2.mark_count() == 2);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp
index 022170f2d13..a74d9cf6ed1 100644
--- a/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <regex>
// template <class charT, class traits = regex_traits<charT>> class basic_regex;
@@ -19,10 +21,8 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
std::regex r2;
r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'};
assert(r2.flags() == std::regex::ECMAScript);
assert(r2.mark_count() == 2);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp
index c1554d6c3eb..87dcc856940 100644
--- a/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <regex>
// template <class charT, class traits = regex_traits<charT>> class basic_regex;
@@ -18,7 +20,6 @@
#include <cassert>
#include "test_macros.h"
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
void
test(std::initializer_list<char> il, std::regex_constants::syntax_option_type f, unsigned mc)
@@ -28,11 +29,9 @@ test(std::initializer_list<char> il, std::regex_constants::syntax_option_type f,
assert(r.mark_count() == mc);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
std::string s1("\\(a\\)");
std::string s2("\\(a[bc]\\)");
std::string s3("\\(a\\([bc]\\)\\)");
@@ -67,5 +66,4 @@ int main()
test({'\\', '(', 'a', '[', 'b', 'c', ']', '\\', ')'}, std::regex_constants::egrep, 0);
test({'\\', '(', 'a', '\\', '(', '[', 'b', 'c', ']', '\\', ')', '\\', ')'}, std::regex_constants::egrep, 0);
test({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex_constants::egrep, 2);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
OpenPOWER on IntegriCloud