Howard Hinnant | 8d1e822 | 2013-06-28 19:11:23 +0000 | [diff] [blame] | 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 | |
Eric Fiselier | 3c35491 | 2017-02-17 08:37:03 +0000 | [diff] [blame] | 19 | // https://bugs.llvm.org/show_bug.cgi?id=11118 |
Howard Hinnant | 8d1e822 | 2013-06-28 19:11:23 +0000 | [diff] [blame] | 20 | |
| 21 | #include <regex> |
| 22 | #include <cassert> |
Marshall Clow | fd5ceb2 | 2016-04-26 16:24:44 +0000 | [diff] [blame] | 23 | #include "test_macros.h" |
Howard Hinnant | 8d1e822 | 2013-06-28 19:11:23 +0000 | [diff] [blame] | 24 | |
Eric Fiselier | d04c685 | 2016-06-01 21:35:39 +0000 | [diff] [blame] | 25 | int main() |
Howard Hinnant | 8d1e822 | 2013-06-28 19:11:23 +0000 | [diff] [blame] | 26 | { |
| 27 | assert(!std::regex_search("ab", std::regex("(?=^)b"))); |
| 28 | assert(!std::regex_search("ab", std::regex("a(?=^)b"))); |
| 29 | } |