string 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // -*- C++ -*-
  2. //===--------------------------- string ----------------------------------===//
  3. //
  4. // The LLVM Compiler Infrastructure
  5. //
  6. // This file is dual licensed under the MIT and the University of Illinois Open
  7. // Source Licenses. See LICENSE.TXT for details.
  8. //
  9. //===----------------------------------------------------------------------===//
  10. #ifndef _LIBCPP_EXPERIMENTAL_STRING
  11. #define _LIBCPP_EXPERIMENTAL_STRING
  12. /*
  13. experimental/string synopsis
  14. // C++1z
  15. namespace std {
  16. namespace experimental {
  17. inline namespace fundamentals_v1 {
  18. namespace pmr {
  19. // basic_string using polymorphic allocator in namespace pmr
  20. template <class charT, class traits = char_traits<charT>>
  21. using basic_string =
  22. std::basic_string<charT, traits, polymorphic_allocator<charT>>;
  23. // basic_string typedef names using polymorphic allocator in namespace
  24. // std::experimental::pmr
  25. typedef basic_string<char> string;
  26. typedef basic_string<char16_t> u16string;
  27. typedef basic_string<char32_t> u32string;
  28. typedef basic_string<wchar_t> wstring;
  29. } // namespace pmr
  30. } // namespace fundamentals_v1
  31. } // namespace experimental
  32. } // namespace std
  33. */
  34. #include <experimental/__config>
  35. #include <string>
  36. #include <experimental/memory_resource>
  37. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  38. #pragma GCC system_header
  39. #endif
  40. _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
  41. template <class _CharT, class _Traits = char_traits<_CharT>>
  42. using basic_string =
  43. _VSTD::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;
  44. typedef basic_string<char> string;
  45. typedef basic_string<char16_t> u16string;
  46. typedef basic_string<char32_t> u32string;
  47. typedef basic_string<wchar_t> wstring;
  48. _LIBCPP_END_NAMESPACE_LFTS_PMR
  49. #endif /* _LIBCPP_EXPERIMENTAL_STRING */