From Annex M of this document:
— parameter names may be omitted in function definitions;
One use I see for this is not having to cast anything to void
, or using an unused
attribute. But was that the rationale? If not, where's this useful? Unnamed parameters can not be accessed, can they?
The rationale was that some parameters from the function declaration (where identifiers were always optional) may not actually be used in the function definition and could therefore be allowed to be omitted.
This feature was described and proposed in the document n2510 where you can read the rationale straight from the source.
As for the "not having to cast to void
", that's now also possible with [[maybe_unused]]
, which can also be used for the function result. So personally I find the unnamed parameters feature quite redundant.