• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
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
7//
8//===----------------------------------------------------------------------===//
9
10export namespace std {
11  // [char.traits], character traits
12  using std::char_traits;
13
14  // [basic.string], basic_string
15  using std::basic_string;
16
17  using std::operator+;
18  using std::operator==;
19  using std::operator<=>;
20
21  // [string.special], swap
22  using std::swap;
23
24  // [string.io], inserters and extractors
25  using std::operator>>;
26  using std::operator<<;
27  using std::getline;
28
29  // [string.erasure], erasure
30  using std::erase;
31  using std::erase_if;
32
33  // basic_string typedef-names
34  using std::string;
35  using std::u16string;
36  using std::u32string;
37  using std::u8string;
38#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
39  using std::wstring;
40#endif
41
42  // [string.conversions], numeric conversions
43  using std::stod;
44  using std::stof;
45  using std::stoi;
46  using std::stol;
47  using std::stold;
48  using std::stoll;
49  using std::stoul;
50  using std::stoull;
51  using std::to_string;
52#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
53  using std::to_wstring;
54#endif
55
56  namespace pmr {
57    using std::pmr::basic_string;
58    using std::pmr::string;
59    using std::pmr::u16string;
60    using std::pmr::u32string;
61    using std::pmr::u8string;
62#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
63    using std::pmr::wstring;
64#endif
65  } // namespace pmr
66
67  // [basic.string.hash], hash support
68  using std::hash;
69
70  // TODO MODULES is this a bug?
71#if _LIBCPP_STD_VER >= 23
72  using std::operator""s;
73#else
74  inline namespace literals {
75    inline namespace string_literals {
76      // [basic.string.literals], suffix for basic_string literals
77      using std::literals::string_literals::operator""s;
78    } // namespace string_literals
79  }   // namespace literals
80#endif
81} // namespace std
82