C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] "Union types" syntactic sugar
From: Михаил Найденов (mihailnajdenov_at_[hidden])
Date: 2020-03-04 08:03:12


Well,

template<class T>
concept charOrUInt8 = std::is_same_v<char> || std::is_same_v<uint8_t>;

void f (charOrUInt8 auto x);

template<charOrUInt8 T>
void f (std::basic_string<T> x)

Close enough, if ask me :)

On Wed, Mar 4, 2020 at 10:55 AM Michał Piotr Gawron via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On 04.03.2020 09:34, Michał Piotr Gawron wrote:
> > Hello everyone.
> >
> > Have something like this ever been proposed?
> [...]
>
> I obviously forgot to add "T" to std::is_same_v<>s ;-)
> --
> Michał Gawron
> mcv.mulabs.org
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>



STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups