From 8be1197285bdff6e03bf26b77052daa710f73068 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 2 Aug 2022 12:46:31 +0200 Subject: [libc++] Implement P2499R0 (`string_view` range constructor should be `explicit`) Reviewed By: #libc, philnik, Mordante Spies: Mordante, jloser, philnik, libcxx-commits Differential Revision: https://reviews.llvm.org/D130785 --- libcxx/include/string_view | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcxx/include/string_view') diff --git a/libcxx/include/string_view b/libcxx/include/string_view index a84ed50..a9aa304 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -331,7 +331,7 @@ public: typename remove_reference_t<_Range>::traits_type; } || is_same_v::traits_type, _Traits>) ) - constexpr _LIBCPP_HIDE_FROM_ABI + constexpr explicit _LIBCPP_HIDE_FROM_ABI basic_string_view(_Range&& __r) : __data(ranges::data(__r)), __size(ranges::size(__r)) {} #endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) -- cgit v1.1