Boost logo

Boost :

From: Дмитрий Архипов (grisumbras_at_[hidden])
Date: 2024-02-08 16:57:31


чт, 8 февр. 2024 г. в 19:11, Andrey Semashev via Boost <boost_at_[hidden]>:
> 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

std::basic_string instead uses this check:

> This overload participates in overload resolution only if
> std::is_convertible_v<const StringViewLike&, std::basic_string_view<CharT, Traits>> is true and
> std::is_convertible_v<const StringViewLike&, const CharT*> is false.


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