C++ Logo

std-proposals

Advanced search

Re: Variadic function template equivalents for operator overloading

From: Phil Endecott <std_proposals_list_at_[hidden]>
Date: Tue, 04 May 2021 18:36:34 +0100
Ville Voutilainen wrote:
> See
> https://en.cppreference.com/w/cpp/utility/format
> which was adopted into C++20.

Yes, I'm aware of that. The rationale that I've seen does not
say much about a preference for variadic function syntax vs.
operator-overloading. There is mention of "chevron hell" in the
{fmt} library's github page. The introduction to the <format>
paper P0645R10 says "printf offers some advantages, such as an
arguably more natural function call API" (which I interpret as
meaning arguably more natural than chained operator overloading).
I'm curious as to what the committee thought - if anything -
about this aspect when <format> was being considered.


Regards, Phil.

Received on 2021-05-04 12:36:37