8 Feb
2024
8 Feb
'24
4:51 p.m.
Andrey Semashev wrote:
On 2/8/24 19:24, Peter Dimov via Boost wrote:
Andrey Semashev wrote:
This implies that the API only works with one character type, which is not always the case, as shown in Boost.Log.
It implies that if you want to accept e.g. wchar_t, you need a separate overload.
This doesn't scale very well. Imagine the amount of overloads in something like boost::filesystem::path. (Yes, I know it currently supports char and wchar_t, but I've been asked to support other character types as well.)
Whether it scales or not, this is the intended use of core::string_view. As I said, if you make the function a template, conversions no longer work, which defeats the purpose of using core::string_view.