1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
11 // class match_results<BidirectionalIterator, Allocator>
13 // explicit match_results(const Allocator& a = Allocator()); // before C++20
14 // match_results() : match_results(Allocator()) {} // C++20
15 // explicit match_results(const Allocator& a); // C++20
19 #include "test_macros.h"
20 #if TEST_STD_VER >= 11
21 #include "test_convertible.h"
24 void test_implicit() {
25 static_assert(test_convertible
<T
>(), "");
26 static_assert(!test_convertible
<T
, typename
T::allocator_type
>(), "");
30 template <class CharT
>
34 typedef std::match_results
<const CharT
*> M
;
35 typedef std::allocator
<std::sub_match
<const CharT
*> > Alloc
;
37 assert(m
.size() == 0);
39 assert(m
.get_allocator() == Alloc());
41 #if TEST_STD_VER >= 11
49 #ifndef TEST_HAS_NO_WIDE_CHARACTERS