//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: no-localization // TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed // UNSUPPORTED: availability-pmr-missing // // namespace std::pmr { // // template // using match_results = // std::match_results>>; // // typedef match_results cmatch; // typedef match_results wcmatch; // typedef match_results smatch; // typedef match_results wsmatch; // // } // namespace std::pmr #include #include #include #include #include "test_macros.h" template void test_match_result_typedef() { using StdMR = std::match_results>>; using PmrMR = std::pmr::match_results; static_assert(std::is_same::value, ""); static_assert(std::is_same::value, ""); } int main(int, char**) { { test_match_result_typedef(); test_match_result_typedef(); #ifndef TEST_HAS_NO_WIDE_CHARACTERS test_match_result_typedef(); test_match_result_typedef(); #endif } { // Check that std::match_results has been included and is complete. std::pmr::smatch s; assert(s.get_allocator().resource() == std::pmr::get_default_resource()); } return 0; }