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
10 changes: 4 additions & 6 deletions source/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,9 @@ auto print_with_thousands(T val)
}


// In keep trying to write string+string_view, and it ought to Just Work without
// the current workarounds. Not having that is a minor impediment to using safe
// and efficient string_views, which we should be encouraging. So for my own use
// and to remove that minor impediment to writing safe and efficient code, I'm
// just going to add this until we get P2591 in C++26(?) -- See: wg21.link/p2591
//
// Provide string+string_view if P2591 is not available.
//
#if __cpp_lib_string_view < 202403L
template<class charT, class traits, class Allocator>
[[nodiscard]] constexpr auto operator+(
std::basic_string<charT, traits, Allocator> lhs,
Expand All @@ -605,6 +602,7 @@ template<class charT, class traits, class Allocator>
{
return rhs.insert(0, lhs);
}
#endif


//-----------------------------------------------------------------------
Expand Down