blob: a74d9cf6ed114f201ab3f0d3d992e265af66be5d [file] [log] [blame]
Howard Hinnant5cd66582010-08-13 18:11:23 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnant412dbeb2010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant5cd66582010-08-13 18:11:23 +00007//
8//===----------------------------------------------------------------------===//
9
Eric Fiselier9f7cc582017-04-18 23:42:15 +000010// UNSUPPORTED: c++98, c++03
11
Howard Hinnant5cd66582010-08-13 18:11:23 +000012// <regex>
13
14// template <class charT, class traits = regex_traits<charT>> class basic_regex;
15
16// basic_regex& operator=(initializer_list<charT> il);
17
18#include <regex>
19#include <cassert>
Marshall Clowfd5ceb22016-04-26 16:24:44 +000020#include "test_macros.h"
Howard Hinnant5cd66582010-08-13 18:11:23 +000021
22int main()
23{
Howard Hinnant5cd66582010-08-13 18:11:23 +000024 std::regex r2;
25 r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'};
26 assert(r2.flags() == std::regex::ECMAScript);
27 assert(r2.mark_count() == 2);
Howard Hinnant5cd66582010-08-13 18:11:23 +000028}