aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/src/string.cpp
diff options
context:
space:
mode:
authorAndrey Khalyavin <halyavin@gmail.com>2022-06-02 00:33:58 +0300
committerAndrey Khalyavin <halyavin@gmail.com>2022-06-02 00:33:58 +0300
commite673b301b03ea16c0bdc9537de9501f1c9b4cf28 (patch)
tree27631393b7e7889db9ac6fcbd8e6b61b0f5a1ba0 /contrib/libs/cxxsupp/libcxx/src/string.cpp
parent5424a48cca3b5a79e8431052b74fafb9768e669e (diff)
downloadydb-e673b301b03ea16c0bdc9537de9501f1c9b4cf28.tar.gz
Update libc++ to eaadc451 (4 Feb 2022).
Notable changes: * fix chrono::duration constructor constraint * delete base class for std::basic_string * add ranges::in_out_out_result and ranges::in_in_out_result * implement indirectly_copyable{,_storable} concepts * rename __referenceable to __can_reference to match text of the standard * add _LIBCPP_HAS_NO_CONCEPTS guards where concepts are used * simplify no concepts guards * add specifications for basic_common_reference and common_type for pair * make _VSTD an alias for std so that it can be removed in the future * remove std from friend declaration to facilitate switch from _VSTD to std * fix TOCTOU issue with std::filesystem::remove_all * add additional constraints to std::ranges::get for subranges when N == 0 * pick unique bit for __regex_word constant * use vsnprintf instead of _vsnprintf on Windows * ADL-proof ranges::iter_swap and ranges::iter_move * implement std::ranges::distance * merge _LIBCPP_HAS_NO_RANGES into _LIBCPP_HAS_NO_CONCEPTS ref:b637aa39f39243eeac99a2109af1daaac7c29316
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/src/string.cpp')
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/string.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/src/string.cpp b/contrib/libs/cxxsupp/libcxx/src/string.cpp
index 3c63f40824..3cde2e9005 100644
--- a/contrib/libs/cxxsupp/libcxx/src/string.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/string.cpp
@@ -21,15 +21,26 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_ABI_NO_BASIC_STRING_BASE_CLASS
+#ifndef _LIBCPP_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
+
+template <bool>
+struct __basic_string_common;
+
+// The struct isn't declared anymore in the headers. It's only here for ABI compatibility.
+template <>
+struct __basic_string_common<true> {
+ _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_length_error() const;
+ _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_out_of_range() const;
+};
+
void __basic_string_common<true>::__throw_length_error() const {
- _VSTD::__throw_length_error("basic_string");
+ std::__throw_length_error("basic_string");
}
-
void __basic_string_common<true>::__throw_out_of_range() const {
- _VSTD::__throw_out_of_range("basic_string");
+ std::__throw_out_of_range("basic_string");
}
-#endif
+
+#endif // _LIBCPP_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
#define _LIBCPP_EXTERN_TEMPLATE_DEFINE(...) template __VA_ARGS__;
#ifdef _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION