[OpenMP][Docs] Update OpenMP supported features table (#126292)
[llvm-project.git] / libcxx / test / std / re / re.regex / re.regex.construct / deduct.verify.cpp
blob8ef87cfc6468f5917db43239afef8e7f87f92be5
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 //===----------------------------------------------------------------------===//
9 // <regex>
10 // UNSUPPORTED: c++03, c++11, c++14
12 // template<class ForwardIterator>
13 // basic_regex(ForwardIterator, ForwardIterator,
14 // regex_constants::syntax_option_type = regex_constants::ECMAScript)
15 // -> basic_regex<typename iterator_traits<ForwardIterator>::value_type>;
17 #include <regex>
18 #include <string>
19 #include <iterator>
20 #include <cassert>
21 #include <cstddef>
24 int main(int, char**)
26 // Test the explicit deduction guides
28 // basic_regex(ForwardIterator, ForwardIterator)
29 // <int> is not an iterator
30 std::basic_regex re(23, 34); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}basic_regex'}}
34 // basic_regex(ForwardIterator, ForwardIterator, flag_type)
35 // <double> is not an iterator
36 std::basic_regex re(23.0, 34.0, std::regex_constants::basic); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}basic_regex'}}
39 return 0;