Debian Codegraph @

libcxx/test/std/re/re.results/re.results.size/max_size.pass.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 match_results<BidirectionalIterator, Allocator>
12
13 // size_type max_size() const;
14
15 #include <regex>
16 #include <cassert>
17 #include "test_macros.h"
18
19 template <class CharT>
20 void
21 test()
22 {
23 std::match_results<const CharT*> m;
24 assert(m.max_size() > 0);
25 }
26
27 int main(int, char**)
28 {
29 test<char>();
30 test<wchar_t>();
31
32 return 0;
33 }