1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
11 // template <class BidirectionalIterator> class sub_match;
13 // string_type str() const;
17 #include "test_macros.h"
23 typedef std::sub_match
<const CharT
*> SM
;
25 SM::string_type str
= sm
.str();
27 const CharT s
[] = {'1', '2', '3', 0};
32 assert(str
== std::string("123"));
34 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
36 typedef wchar_t CharT
;
37 typedef std::sub_match
<const CharT
*> SM
;
39 SM::string_type str
= sm
.str();
41 const CharT s
[] = {'1', '2', '3', 0};
46 assert(str
== std::wstring(L
"123"));