🛠 Properly specify 4-argument copy_str range version

This commit is contained in:
ThePhD 2023-12-15 00:42:46 -05:00
parent ee799d6fdb
commit e5e1faefb8
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA

View File

@ -854,7 +854,7 @@ template <typename Char, typename T, typename U,
FMT_ENABLE_IF(
std::is_same<remove_const_t<T>, U>::value && is_char<U>::value)>
FMT_CONSTEXPR auto copy_str(T* begin, T* end, U* out, U* out_end) -> std::ranges::subrange<U*, U*> {
if (is_constant_evaluated()) return copy_str<Char, T*, U*>(begin, end, out, out_end);
if (is_constant_evaluated()) return copy_str<Char, T*,T*, U*, U*>(begin, end, out, out_end);
auto size = to_unsigned(end - begin);
auto out_size = to_unsigned(out_end - out);
if (size > out_size) size = out_size;