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