Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions libcxx/include/sstream
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,6 @@ typedef basic_stringstream<wchar_t> wstringstream;
_LIBCPP_PUSH_MACROS
#include <__undef_macros>

// TODO(LLVM-19): Remove this once we drop support for Clang 16,
// which had this bug: https://github.com/llvm/llvm-project/issues/40363
#ifdef _WIN32
# define _LIBCPP_HIDE_FROM_ABI_SSTREAM _LIBCPP_ALWAYS_INLINE
#else
# define _LIBCPP_HIDE_FROM_ABI_SSTREAM _LIBCPP_HIDE_FROM_ABI
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

// Class template basic_stringbuf [stringbuf]
Expand Down Expand Up @@ -460,9 +452,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
string_type str() const;
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return str(__str_.get_allocator()); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return str(__str_.get_allocator()); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && {
_LIBCPP_HIDE_FROM_ABI string_type str() && {
const basic_string_view<_CharT, _Traits> __view = view();
typename string_type::size_type __pos = __view.empty() ? 0 : __view.data() - __str_.data();
// In C++23, this is just string_type(std::move(__str_), __pos, __view.size(), __str_.get_allocator());
Expand Down Expand Up @@ -948,9 +940,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
_LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return __sb_.str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return __sb_.str(); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() && { return std::move(__sb_).str(); }
#endif

#if _LIBCPP_STD_VER >= 20
Expand Down Expand Up @@ -1085,9 +1077,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
_LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return __sb_.str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return __sb_.str(); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() && { return std::move(__sb_).str(); }
#endif

#if _LIBCPP_STD_VER >= 20
Expand Down Expand Up @@ -1225,9 +1217,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
_LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return __sb_.str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return __sb_.str(); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() && { return std::move(__sb_).str(); }
#endif

#if _LIBCPP_STD_VER >= 20
Expand Down