xref: /llvm-project/libcxx/test/std/re/re.submatch/re.submatch.members/default.pass.cpp (revision f4c1258d5633fcf06385ff3fd1f4bf57ab971964)
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 sub_match;
12 
13 // constexpr sub_match();
14 
15 #include <regex>
16 #include <cassert>
17 #include "test_macros.h"
18 
main(int,char **)19 int main(int, char**)
20 {
21     {
22         typedef char CharT;
23         typedef std::sub_match<const CharT*> SM;
24         SM sm;
25         assert(sm.matched == false);
26     }
27 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
28     {
29         typedef wchar_t CharT;
30         typedef std::sub_match<const CharT*> SM;
31         SM sm;
32         assert(sm.matched == false);
33     }
34 #endif
35 
36   return 0;
37 }
38