]>
Commit | Line | Data |
---|---|---|
1 | // Copyright (C) 2018-2024 Free Software Foundation, Inc. | |
2 | // | |
3 | // This file is part of the GNU ISO C++ Library. This library is free | |
4 | // software; you can redistribute it and/or modify it under the | |
5 | // terms of the GNU General Public License as published by the | |
6 | // Free Software Foundation; either version 3, or (at your option) | |
7 | // any later version. | |
8 | ||
9 | // This library is distributed in the hope that it will be useful, | |
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | // GNU General Public License for more details. | |
13 | ||
14 | // You should have received a copy of the GNU General Public License along | |
15 | // with this library; see the file COPYING3. If not see | |
16 | // <http://www.gnu.org/licenses/>. | |
17 | ||
18 | // { dg-do compile { target c++14 } } | |
19 | // { dg-require-effective-target cxx11_abi } | |
20 | ||
21 | #include <experimental/regex> | |
22 | ||
23 | namespace xpmr = std::experimental::pmr; | |
24 | ||
25 | struct X; | |
26 | static_assert(std::is_same<xpmr::match_results<X*>, | |
27 | std::match_results<X*, | |
28 | xpmr::polymorphic_allocator<std::sub_match<X*>>>>::value, | |
29 | "pmr::match_results"); | |
30 | ||
31 | static_assert(std::is_same<xpmr::cmatch, | |
32 | std::match_results<const char*, | |
33 | xpmr::polymorphic_allocator<std::sub_match<const char*>>>>::value, | |
34 | "pmr::cmatch"); | |
35 | static_assert(std::is_same<xpmr::smatch, | |
36 | std::match_results<xpmr::string::const_iterator, | |
37 | xpmr::polymorphic_allocator< | |
38 | std::sub_match<xpmr::string::const_iterator>>>>::value, | |
39 | "pmr::smatch"); | |
40 | #ifdef _GLIBCXX_USE_WCHAR_T | |
41 | static_assert(std::is_same<xpmr::wcmatch, | |
42 | std::match_results<const wchar_t*, | |
43 | xpmr::polymorphic_allocator<std::sub_match<const wchar_t*>>>>::value, | |
44 | "pmr::wcmatch"); | |
45 | static_assert(std::is_same<xpmr::wsmatch, | |
46 | std::match_results<xpmr::wstring::const_iterator, | |
47 | xpmr::polymorphic_allocator< | |
48 | std::sub_match<xpmr::wstring::const_iterator>>>>::value, | |
49 | "pmr::wsmatch"); | |
50 | #endif |