aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/string_view
diff options
context:
space:
mode:
authorIgor Zhukov <fsb4000@yandex.ru>2022-08-02 12:46:31 +0200
committerNikolas Klauser <nikolasklauser@berlin.de>2022-08-02 12:47:45 +0200
commit8be1197285bdff6e03bf26b77052daa710f73068 (patch)
tree4001b6ba87931a6bdddfa159d47e398426aec526 /libcxx/include/string_view
parentc23e2c015fb78411af0280a5af6437614b7192b3 (diff)
downloadllvm-8be1197285bdff6e03bf26b77052daa710f73068.zip
llvm-8be1197285bdff6e03bf26b77052daa710f73068.tar.gz
llvm-8be1197285bdff6e03bf26b77052daa710f73068.tar.bz2
[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
Diffstat (limited to 'libcxx/include/string_view')
-rw-r--r--libcxx/include/string_view2
1 files changed, 1 insertions, 1 deletions
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<typename remove_reference_t<_Range>::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)