C++ Logo

std-proposals

Advanced search

Re: [std-proposals] The Oxford variadic comma

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Fri, 1 Mar 2024 17:44:54 +0000
I got the idea, it's essentially writing a template without writing template. I feel super dirty with that one, don't know how that managed to make it in to the standard (specially considering that it can be written in a more explicit way), but that's just the status quo.
I guess there was too much over the keyword auto at the time.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Jan Schultke via Std-Proposals <std-proposals_at_[hidden]>
Sent: Friday, March 1, 2024 6:34:36 PM
To: Barry Revzin <barry.revzin_at_[hidden]>
Cc: Jan Schultke <janschultke_at_[hidden]>; Christof Meerwald <cmeerw_at_[hidden]>; std-proposals <std-proposals_at_[hidden]>
Subject: Re: [std-proposals] The Oxford variadic comma

> Uh, why not? Is there a particular reason why it's important to allow omitting the comma specifically here?

Because this is an abbreviated variadic function template.

If f(auto... x) is a variadic function template, removing x should
result in a function template with the same type. This is the case in
the current draft, it's totally fine, I'm happy with it, and I'm not
deprecating it.
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-03-01 17:44:57