Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-02-08 16:36:26


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.)

>> Template interface parity is useful in cases like this:
>>
>> https://github.com/boostorg/container/blob/6e697d796897b32b471b4f0740dcaa03d8ee57cc/include/boost/container/string.hpp#L685-L691
>>
>> https://github.com/boostorg/container/blob/6e697d796897b32b471b4f0740dcaa03d8ee57cc/include/boost/container/string.hpp#L2314-L2316
>
> This accepts vector<T, A>, but this might be considered a feature. :-)

:) Yes, but my point is that it currently doesn't work with
boost::core::string_view.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk