Subject: Re: [std-proposals] Variadic function template equivalents for operator overloading
From: Marcin Jaczewski (marcinjaczewski86_at_[hidden])
Date: 2021-05-06 03:39:25
czw., 6 maj 2021 o 06:31 Thiago Macieira via Std-Proposals
> On Tuesday, 4 May 2021 10:39:06 PDT Avi Kivity via Std-Proposals wrote:
> > Since they adopted the proposal, it appears they agree that the
> > function-call syntax is more natural than chaining.
> auto dooms the chaining.
> auto result1 = format(fmtstring, a, b, c);
> auto result2 = format(fmtstring) << a << b << c;
> What is the type of result2?
This could require "operator auto".
btw recently I discovered that we already have this operator in C++,
but only for one thing: C arrays (value decay).
And as one goal of C++ is that user types should have the same
capabilities as built in then they should be able to deacy too.
Of course if used too much then it could be problematic, but if done
correctly then it would be more beneficial.
As arrays behavior is bad because they fit more C than C++, but user
types from the start will fit C++ more.
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DPG Cloud Engineering
> Std-Proposals mailing list
STD-PROPOSALS list run by firstname.lastname@example.org
Standard Proposals Archives on Google Groups