For explicit templates:
explicit template <typename T, typename U, typename ...V>
T Func ()
For
selective explicit templates
Template <explicit typename T, typenname U, typename ...V>
T Func ()
For explicit constructors:
template <typename T>
explicit T Class<T>::Class (T var)
From: Jason McKesson via Std-Proposals
Sent: 01 May 2022 21:51
To: std-proposals@lists.isocpp.org
Cc: Jason McKesson
Subject: Re: [std-proposals] Explicit keyword for template parameters
On Sun, May 1, 2022 at 5:06 AM Jens Maurer via Std-Proposals
<std-proposals@lists.isocpp.org> wrote:
>
> On 01/05/2022 09.46, Abdullah Qasim via Std-Proposals wrote:
> > How about:
> >
> >
> >
> > explicit template <typename T, typename U, typename ...V>
> >
> > T Func(U u, V... v)
> >
> >
> >
> > ??
>
> If "Func" is a constructor, how do you differentiate between
> the current meaning of "explicit" on a constructor and the
> new meaning?
Equally importantly, how do you differentiate between some parameters
which should be deduced and some that shouldn't?
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals