Debian Codegraph @

libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.compile.fail.cpp

raw
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 // class regex_iterator<BidirectionalIterator, charT, traits>
12
13 // regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
14 // const regex_type&& re,
15 // int submatch = 0,
16 // regex_constants::match_flag_type m =
17 // regex_constants::match_default) = delete;
18
19 #include <regex>
20 #include <cassert>
21 #include "test_macros.h"
22
23 #if TEST_STD_VER < 14
24 #error
25 #endif
26
27 int main(int, char**)
28 {
29 {
30 const char phone_book[] = "555-1234, 555-2345, 555-3456";
31 std::cregex_iterator i(
32 std::begin(phone_book), std::end(phone_book),
33 std::regex("\\d{3}-\\d{4}"));
34 }
35
36 return 0;
37 }