C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow trailing commas in function calls

From: Jan Schultke <janschultke_at_[hidden]>
Date: Mon, 18 Aug 2025 09:45:40 +0200
> What does the comma in new-placement and new-initializer actually do?

It separates the list of arguments, just like in a function call. For example:

    new (a,b,c,) T(x,y,z,)

Grammatically, the proposal should just make a trailing comma part of
the expression-list rule, so it would naturally work in placement-new
as well, since both these places take an expression-list.

Received on 2025-08-18 07:45:55