mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
Cleanup _LIBCPP_HAS_NO_<c++11-features> macro usage in regex
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user