Howard Hinnant | 5cd6658 | 2010-08-13 18:11:23 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Howard Hinnant | 5cd6658 | 2010-08-13 18:11:23 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // <regex> |
| 10 | |
| 11 | // template <class charT, class traits = regex_traits<charT>> class basic_regex; |
| 12 | |
| 13 | // basic_regex& operator=(const basic_regex& e); |
| 14 | |
| 15 | #include <regex> |
| 16 | #include <cassert> |
Marshall Clow | fd5ceb2 | 2016-04-26 16:24:44 +0000 | [diff] [blame] | 17 | #include "test_macros.h" |
Howard Hinnant | 5cd6658 | 2010-08-13 18:11:23 +0000 | [diff] [blame] | 18 | |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 19 | int main(int, char**) |
Howard Hinnant | 5cd6658 | 2010-08-13 18:11:23 +0000 | [diff] [blame] | 20 | { |
| 21 | std::regex r1("(a([bc]))"); |
| 22 | std::regex r2; |
| 23 | r2 = r1; |
| 24 | assert(r2.flags() == std::regex::ECMAScript); |
| 25 | assert(r2.mark_count() == 2); |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 26 | |
| 27 | return 0; |
Howard Hinnant | 5cd6658 | 2010-08-13 18:11:23 +0000 | [diff] [blame] | 28 | } |