blob: 1abb72151651642c89438ead25e64ae9908173cd [file] [log] [blame]
Howard Hinnant5cd66582010-08-13 18:11:23 +00001//===----------------------------------------------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:40 +00003// 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 Hinnant5cd66582010-08-13 18:11:23 +00006//
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 Clowfd5ceb22016-04-26 16:24:44 +000017#include "test_macros.h"
Howard Hinnant5cd66582010-08-13 18:11:23 +000018
JF Bastien2df59c52019-02-04 20:31:13 +000019int main(int, char**)
Howard Hinnant5cd66582010-08-13 18:11:23 +000020{
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 Bastien2df59c52019-02-04 20:31:13 +000026
27 return 0;
Howard Hinnant5cd66582010-08-13 18:11:23 +000028}