Skip to content

Commit be8a50f

Browse files
committed
Workaround clang bug
Clang < 15 has a bug in c++-20 mode where using the `std::basic_string` constructor taking a pointer and size leads to an undefined symbol `M_construct` when used with Unicode char types Avoid this by using the range constructor.
1 parent 547d8e0 commit be8a50f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/core/detail/string_view.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ template<class Ch> class basic_string_view
422422

423423
template<class A> operator std::basic_string<Ch, std::char_traits<Ch>, A>() const
424424
{
425-
return std::basic_string<Ch, std::char_traits<Ch>, A>( data(), size() );
425+
return std::basic_string<Ch, std::char_traits<Ch>, A>( begin(), end() );
426426
}
427427

428428
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)

0 commit comments

Comments
 (0)