Skip to content

Commit cbf5711

Browse files
authored
Use constructible_from rather than convertible to string_view (#1486)
1 parent 65b0ecf commit cbf5711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/glaze/core/common.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ namespace glz
229229
requires { std::tuple_size<T>::value; } && std::same_as<T, std::array<char, std::tuple_size_v<T>>>;
230230

231231
template <class T>
232-
concept str_t = (!std::same_as<std::nullptr_t, T> && std::convertible_to<std::decay_t<T>, std::string_view>) ||
232+
concept str_t = (!std::same_as<std::nullptr_t, T> && std::constructible_from<std::string_view, std::decay_t<T>>) ||
233233
array_char_t<T>;
234234

235235
// this concept requires that T is a writeable string. It can be resized, appended to, or assigned to

0 commit comments

Comments
 (0)