1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class BidirectionalIterator, class Allocator, class charT, class traits>
14 // regex_match(BidirectionalIterator first, BidirectionalIterator last,
15 // match_results<BidirectionalIterator, Allocator>& m,
16 // const basic_regex<charT, traits>& e,
17 // regex_constants::match_flag_type flags = regex_constants::match_default);
19 // https://bugs.llvm.org/show_bug.cgi?id=16135
24 #include "test_macros.h"
29 std::string re("\\{a\\}");
30 std::string target("{a}");
33 assert((std::regex_match(target, smatch, regex)));
39 std::string re("\\{a\\}");
40 std::string target("{a}");
41 std::regex regex(re, std::regex::extended);
43 assert((std::regex_match(target, smatch, regex)));
49 std::string re("\\{a\\}");
50 std::string target("{a}");
51 std::regex regex(re, std::regex::awk);
53 assert((std::regex_match(target, smatch, regex)));
59 std::string re("\\{a\\}");
60 std::string target("{a}");
61 std::regex regex(re, std::regex::egrep);
63 assert((std::regex_match(target, smatch, regex)));