1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10export namespace std {
11#ifndef _LIBCPP_HAS_NO_LOCALIZATION
12  // [re.const], regex constants
13  namespace regex_constants {
14    using std::regex_constants::error_type;
15    using std::regex_constants::match_flag_type;
16    using std::regex_constants::syntax_option_type;
17
18    // regex_constants is a bitmask type.
19    // [bitmask.types] specified operators
20    using std::regex_constants::operator&;
21    using std::regex_constants::operator&=;
22    using std::regex_constants::operator^;
23    using std::regex_constants::operator^=;
24    using std::regex_constants::operator|;
25    using std::regex_constants::operator|=;
26    using std::regex_constants::operator~;
27
28  } // namespace regex_constants
29
30  // [re.badexp], class regex_error
31  using std::regex_error;
32
33  // [re.traits], class template regex_traits
34  using std::regex_traits;
35
36  // [re.regex], class template basic_regex
37  using std::basic_regex;
38
39  using std::regex;
40#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
41  using std::wregex;
42#  endif
43
44  // [re.regex.swap], basic_regex swap
45  using std::swap;
46
47  // [re.submatch], class template sub_match
48  using std::sub_match;
49
50  using std::csub_match;
51  using std::ssub_match;
52#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
53  using std::wcsub_match;
54  using std::wssub_match;
55#  endif
56
57  // [re.submatch.op], sub_match non-member operators
58  using std::operator==;
59  using std::operator<=>;
60
61  using std::operator<<;
62
63  // [re.results], class template match_results
64  using std::match_results;
65
66  using std::cmatch;
67  using std::smatch;
68#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
69  using std::wcmatch;
70  using std::wsmatch;
71#  endif
72
73  // match_results comparisons
74
75  // [re.results.swap], match_results swap
76
77  // [re.alg.match], function template regex_match
78  using std::regex_match;
79
80  // [re.alg.search], function template regex_search
81  using std::regex_search;
82
83  // [re.alg.replace], function template regex_replace
84  using std::regex_replace;
85
86  // [re.regiter], class template regex_iterator
87  using std::regex_iterator;
88
89  using std::cregex_iterator;
90  using std::sregex_iterator;
91#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
92  using std::wcregex_iterator;
93  using std::wsregex_iterator;
94#  endif
95
96  // [re.tokiter], class template regex_token_iterator
97  using std::regex_token_iterator;
98
99  using std::cregex_token_iterator;
100  using std::sregex_token_iterator;
101#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
102  using std::wcregex_token_iterator;
103  using std::wsregex_token_iterator;
104#  endif
105
106  namespace pmr {
107    using std::pmr::match_results;
108
109    using std::pmr::cmatch;
110    using std::pmr::smatch;
111#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
112    using std::pmr::wcmatch;
113    using std::pmr::wsmatch;
114#  endif
115  }    // namespace pmr
116#endif // _LIBCPP_HAS_NO_LOCALIZATION
117} // namespace std
118