C++ Logo


Advanced search

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

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Wed, 4 May 2022 09:20:32 +0200
On 04/05/2022 08.58, Abdullah Qasim via Std-Proposals wrote:
> Also, then why was:
> explicit int func (double x, float y)>
> ever added???

"explicit" on anything but constructors and
conversion functions is ill-formed.
See [dcl.fct.spec] p3.

> When you could use:
> int func (double x, float y)
> int fuc (auto, auto) =delete;
> ??

"explicit" on constructors and conversion functions
has semantics different from adding deleted overloads.

> Now THAT is a point!

> Consistency!

I'm not sure sentences with exclamation marks and
random all-caps words help your concerns.

Personally, I'm increasingly getting the impression
that participating in these discussions is a waste
of time for me. If you have a specific suggestion,
please write a detailed paper, explaining what
exactly you propose, which use-cases your proposal
addresses, and how it fits into the rest of the language,
including overload resolution.


Received on 2022-05-04 07:20:36