C++ Logo


Advanced search

Re: [std-proposals] Add more methods to std::initializer_list instead of overloading

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 12 Sep 2022 14:37:53 +0300
On Mon, 12 Sept 2022 at 14:33, blacktea hamburger via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> Making a private member function public and overload resolution for users and friends different won't cause problems as I said.

We're veering off-topic.. I don't see where you explain how it won't
cause problems.

> For the biggest problem you said, "TwoRoundsPreferAsWritten" can be chosen so that if x.f() is used, x::f will be preferred to avoid ADL.

That doesn't help at all. Currently, x.f() will never call a free
function, no matter what you do. That's an advantage,
and a guarantee that API designers rely on.

Received on 2022-09-12 11:38:05