]>
Commit | Line | Data |
---|---|---|
be58e01d | 1 | // { dg-do compile { target c++11 } } |
6adffd3f | 2 | |
3 | // | |
4 | // 2010-06-10 Stephen M. Webb <stephen.webb@bregmasoft.ca> | |
5 | // | |
fbd26352 | 6 | // Copyright (C) 2010-2019 Free Software Foundation, Inc. |
6adffd3f | 7 | // |
8 | // This file is part of the GNU ISO C++ Library. This library is free | |
9 | // software; you can redistribute it and/or modify it under the | |
10 | // terms of the GNU General Public License as published by the | |
11 | // Free Software Foundation; either version 3, or (at your option) | |
12 | // any later version. | |
13 | // | |
14 | // This library is distributed in the hope that it will be useful, | |
15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | // GNU General Public License for more details. | |
18 | // | |
19 | // You should have received a copy of the GNU General Public License along | |
20 | // with this library; see the file COPYING3. If not see | |
21 | // <http://www.gnu.org/licenses/>. | |
22 | ||
23 | // 28.10 Class template sub_match | |
24 | ||
25 | #include <regex> | |
26 | ||
27 | void | |
28 | test01() | |
29 | { | |
6adffd3f | 30 | typedef std::match_results<char*> mr; |
31 | ||
32 | typedef mr::value_type value_type; | |
33 | typedef mr::const_reference const_reference; | |
34 | typedef mr::reference reference; | |
35 | typedef mr::const_iterator const_iterator; | |
36 | typedef mr::iterator iterator; | |
37 | typedef mr::difference_type difference_type; | |
38 | typedef mr::size_type size_type; | |
39 | typedef mr::allocator_type allocator_type; | |
40 | typedef mr::char_type char_type; | |
41 | typedef mr::string_type string_type; | |
1a3d7dd4 | 42 | |
43 | static_assert(std::is_same<value_type, std::sub_match<char*>>::value, ""); | |
44 | static_assert(std::is_same<const_reference, const value_type&>::value, ""); | |
45 | static_assert(std::is_same<reference, value_type&>::value, "DR 2306"); | |
46 | static_assert(std::is_same<const_iterator, iterator>::value, ""); | |
47 | static_assert(std::is_same<char_type, char>::value, ""); | |
48 | static_assert(std::is_same<string_type, std::string>::value, ""); | |
6adffd3f | 49 | } |