1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 // <regex>
10
11 // template <class BidirectionalIterator, class Allocator, class charT, class traits>
12 // bool
13 // regex_search(BidirectionalIterator first, BidirectionalIterator last,
14 // match_results<BidirectionalIterator, Allocator>& m,
15 // const basic_regex<charT, traits>& e,
16 // regex_constants::match_flag_type flags = regex_constants::match_default);
17
18 // https://llvm.org/PR11118
19
20 #include <regex>
21 #include <cassert>
22 #include "test_macros.h"
23
main(int,char **)24 int main(int, char**)
25 {
26 assert(!std::regex_search("ab", std::regex("(?=^)b")));
27 assert(!std::regex_search("ab", std::regex("a(?=^)b")));
28
29 return 0;
30 }
31