C++ Logo

std-proposals

Advanced search

Re: "Union types" syntactic sugar

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 4 Mar 2020 20:25:35 +0200
On Wed, 4 Mar 2020 at 20:16, Barry Revzin <barry.revzin_at_[hidden]> wrote:
>> >> void f(std::basic_string<any_of<char, uint8_t> auto> x);
>> >
>> >
>> > This one is not valid in C++20, but hopefully will become valid in C++23 (although the auto would go outside the template - basic_string<Concept> auto)
>>
>> I don't think it would go outside.
>
>
> I'm looking forward to reading in your proposal why it should go inside :-)

Because that's where T goes, so I would naively think that's also
where auto goes, and where Concept auto goes.
Otherwise I don't know how to write vector<auto>, if the auto is
supposed to go outside the template-param list
and $somethingelse should go inside it.

Received on 2020-03-04 12:28:30