-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Hello,
I have a question regarding the design of the free functions:subspan
, first
and last
:
As they do not explicitly accept span<T>
are they intended to be used with any type that can be accepted by make_span
function? If it is the case then the implementation seems to have an issue: as ADL is not finding them with non-span-specialization parameters the call to this functions should be qualified (currently they are not available in the nonstd
namespace) and make_span
in the trailing return type expression should be visible for non-ADL. Unfortunately the unit-tests cover only the cases where the span specialization is passed to the functions (works because of ADL), so it is not clear if the use-case was considered, although I personally find it to be useful (would be glad to contribute here).
If the functions are designed to be used with span-s only as wrappers for methods to avoid .template
then maybe they could accept span<T>
?
Could you please clarify the use cases and rational behind the design?
Thank you.