C++ Logo

std-proposals

Advanced search

Re: [std-proposals] explicit keyword (new use)

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Tue, 3 May 2022 19:32:55 +0300
On Tue, 3 May 2022 at 19:27, Giuseppe D'Angelo via Std-Proposals
<std-proposals_at_[hidden]> wrote:

> > 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>

Sure we do - use a parameter of a wrapper type that is not implicitly
convertible from (or to) anything other than
the type you want it to be convertible from. Other than that, I agree
with your repeated request
for an actual proposal, With Rationale.

Received on 2022-05-03 16:33:08