Date: Tue, 3 May 2022 18:27:01 +0200
On 03/05/2022 18:16, Ville Voutilainen via Std-Proposals wrote:
>> But learning*what* precisely? What does f(explicit X) accept?
>>
>> 1) only and precisely X
> void f(std::same_as<X> auto); // like this ?
>
>> 2) things implicitly convertible to X
> void f(std::convertible_to<X> auto); // like this?
>
> We already have the language facility that allows us to declare one
> function (template) that accepts arguments of exactly the
> type of the parameter, and no implicit conversions are performed.
<devil's advocate>
We don't have ways that don't require to create function templates, or
to duplicate every single function to add =delete overloads.
</devil's advocate>
Again, where's the concrete proposal so one can discuss its pros/cons
rather than imagining what this thing _should_ do?
Thanks,
>> But learning*what* precisely? What does f(explicit X) accept?
>>
>> 1) only and precisely X
> void f(std::same_as<X> auto); // like this ?
>
>> 2) things implicitly convertible to X
> void f(std::convertible_to<X> auto); // like this?
>
> We already have the language facility that allows us to declare one
> function (template) that accepts arguments of exactly the
> type of the parameter, and no implicit conversions are performed.
<devil's advocate>
We don't have ways that don't require to create function templates, or
to duplicate every single function to add =delete overloads.
</devil's advocate>
Again, where's the concrete proposal so one can discuss its pros/cons
rather than imagining what this thing _should_ do?
Thanks,
-- Giuseppe D'Angelo
Received on 2022-05-03 16:27:09