Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
Louis Dionne | 9bd9388 | 2021-11-17 16:25:01 -0500 | [diff] [blame] | 2 | //===----------------------------------------------------------------------===// |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 3 | // |
Chandler Carruth | d201210 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | // See https://llvm.org/LICENSE.txt for license information. |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _LIBCPP_EXPERIMENTAL_STRING |
| 11 | #define _LIBCPP_EXPERIMENTAL_STRING |
Louis Dionne | b4fce35 | 2022-03-25 12:55:36 -0400 | [diff] [blame^] | 12 | |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 13 | /* |
| 14 | experimental/string synopsis |
| 15 | |
| 16 | // C++1z |
| 17 | namespace std { |
| 18 | namespace experimental { |
| 19 | inline namespace fundamentals_v1 { |
| 20 | namespace pmr { |
| 21 | |
| 22 | // basic_string using polymorphic allocator in namespace pmr |
| 23 | template <class charT, class traits = char_traits<charT>> |
| 24 | using basic_string = |
| 25 | std::basic_string<charT, traits, polymorphic_allocator<charT>>; |
| 26 | |
| 27 | // basic_string typedef names using polymorphic allocator in namespace |
| 28 | // std::experimental::pmr |
| 29 | typedef basic_string<char> string; |
| 30 | typedef basic_string<char16_t> u16string; |
| 31 | typedef basic_string<char32_t> u32string; |
| 32 | typedef basic_string<wchar_t> wstring; |
| 33 | |
| 34 | } // namespace pmr |
| 35 | } // namespace fundamentals_v1 |
| 36 | } // namespace experimental |
| 37 | } // namespace std |
| 38 | |
| 39 | */ |
| 40 | |
Louis Dionne | b4fce35 | 2022-03-25 12:55:36 -0400 | [diff] [blame^] | 41 | #include <__assert> // all public C++ headers provide the assertion handler |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 42 | #include <experimental/__config> |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 43 | #include <experimental/memory_resource> |
Arthur O'Dwyer | 65077c0 | 2022-01-07 09:45:05 -0500 | [diff] [blame] | 44 | #include <string> |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 45 | |
| 46 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
Arthur O'Dwyer | 6eeaa00 | 2022-02-01 20:16:40 -0500 | [diff] [blame] | 47 | # pragma GCC system_header |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 48 | #endif |
| 49 | |
| 50 | _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR |
| 51 | |
| 52 | template <class _CharT, class _Traits = char_traits<_CharT>> |
| 53 | using basic_string = |
| 54 | _VSTD::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; |
| 55 | |
| 56 | typedef basic_string<char> string; |
| 57 | typedef basic_string<char16_t> u16string; |
| 58 | typedef basic_string<char32_t> u32string; |
Louis Dionne | 8925814 | 2021-08-23 15:32:36 -0400 | [diff] [blame] | 59 | #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 60 | typedef basic_string<wchar_t> wstring; |
Louis Dionne | 8925814 | 2021-08-23 15:32:36 -0400 | [diff] [blame] | 61 | #endif |
Eric Fiselier | e047a72 | 2016-05-07 03:09:55 +0000 | [diff] [blame] | 62 | |
| 63 | _LIBCPP_END_NAMESPACE_LFTS_PMR |
| 64 | |
| 65 | #endif /* _LIBCPP_EXPERIMENTAL_STRING */ |