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 ST, class SA, class Allocator, class charT, class traits>
12// bool regex_match(const basic_string<charT, ST, SA>&&,
13// match_results<
14// typename basic_string<charT, ST, SA>::const_iterator,
15// Allocator>&,
16// const basic_regex<charT, traits>&,
17// regex_constants::match_flag_type =
18// regex_constants::match_default) = delete;
19
20#include <regex>
21#include <cassert>
22#include "test_macros.h"
23
24#if TEST_STD_VER < 14
25#error
26#endif
27
28int main(int, char**)
29{
30 {
31 std::smatch m;
32 std::regex re{"*"};
33 std::regex_match(std::string("abcde"), m, re);
34 }
35
36 return 0;
37}
38

source code of libcxx/test/std/re/re.alg/re.alg.match/basic.compile.fail.cpp