1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <regex> 11 12 // template <class BidirectionalIterator, class Allocator, class charT, class traits> 13 // bool 14 // regex_search(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); 18 19 // http://llvm.org/bugs/show_bug.cgi?id=11118 20 21 #include <regex> 22 #include <cassert> 23 24 int main() 25 { 26 assert(!std::regex_search("ab", std::regex("(?=^)b"))); 27 assert(!std::regex_search("ab", std::regex("a(?=^)b"))); 28 } 29