Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/ww898/utf_sizes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,23 @@ size_t size(It it, Eit const eit)
return total_cp;
}

template<typename Ch>
template<typename Ch, typename Utf = utf_selector_t<Ch>>
size_t size(Ch const * str)
{
return size<utf_selector_t<Ch>>(str);
return size<Utf>(str);
}

template<typename Ch>
template<typename Ch, typename Utf = utf_selector_t<Ch>>
size_t size(std::basic_string<Ch> str)
{
return size<utf_selector_t<Ch>>(str.cbegin(), str.cend());
return size<Utf>(str.cbegin(), str.cend());
}

#if __cpp_lib_string_view >= 201606
template<typename Ch>
template<typename Ch, typename Utf = utf_selector_t<Ch>>
size_t size(std::basic_string_view<Ch> str)
{
return size<utf_selector_t<Ch>>(str.cbegin(), str.cend());
return size<Utf>(str.cbegin(), str.cend());
}
#endif

Expand Down