| 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 |
#include <regex> |
| 19 |
#include <cassert> |
| 20 |
|
| 21 |
#include "test_macros.h" |
| 22 |
|
| 23 |
|
| 24 |
// PR34310 |
| 25 |
int main(int, char**) |
| 26 |
{ |
| 27 |
assert(std::regex_search("HelloWorld", std::regex("[^\\W]"))); |
| 28 |
assert(std::regex_search("_", std::regex("[^\\W]"))); |
| 29 |
return 0; |
| 30 |
} |