blob: 75803e6002d6be7dd385040c4df7905e1801c3e3 [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
Eric Fiselier9f7cc582017-04-18 23:42:15 +00009// UNSUPPORTED: c++98, c++03
10
Howard Hinnant5cd66582010-08-13 18:11:23 +000011// <regex>
12
13// template <class charT, class traits = regex_traits<charT>> class basic_regex;
14
15// basic_regex& operator=(initializer_list<charT> il);
16
17#include <regex>
18#include <cassert>
Marshall Clowfd5ceb22016-04-26 16:24:44 +000019#include "test_macros.h"
Howard Hinnant5cd66582010-08-13 18:11:23 +000020
21int main()
22{
Howard Hinnant5cd66582010-08-13 18:11:23 +000023 std::regex r2;
24 r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'};
25 assert(r2.flags() == std::regex::ECMAScript);
26 assert(r2.mark_count() == 2);
Howard Hinnant5cd66582010-08-13 18:11:23 +000027}