blob: 2d753ed14701ef76125822335fff33a018fa58e8 [file] [log] [blame]
Howard Hinnant8d1e8222013-06-28 19:11:23 +00001//===----------------------------------------------------------------------===//
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 Fiselier3c354912017-02-17 08:37:03 +000019// https://bugs.llvm.org/show_bug.cgi?id=11118
Howard Hinnant8d1e8222013-06-28 19:11:23 +000020
21#include <regex>
22#include <cassert>
Marshall Clowfd5ceb22016-04-26 16:24:44 +000023#include "test_macros.h"
Howard Hinnant8d1e8222013-06-28 19:11:23 +000024
Eric Fiselierd04c6852016-06-01 21:35:39 +000025int main()
Howard Hinnant8d1e8222013-06-28 19:11:23 +000026{
27 assert(!std::regex_search("ab", std::regex("(?=^)b")));
28 assert(!std::regex_search("ab", std::regex("a(?=^)b")));
29}