Title
Explicit object parameters of type void
Status
dr
Section
9.3.4.6 [dcl.fct]
Submitter
Anoop Rana

Created on 2024-07-21.00:00:00 last changed 4 days ago

Messages

Date: 2024-08-16.19:45:15

Proposed resolution (approved by CWG 2024-08-16):

Change in 9.3.4.6 [dcl.fct] paragraph 3 as follows:

If the parameter-declaration-clause is empty, the function takes no arguments. A parameter list consisting of a single unnamed non-object parameter of non-dependent type void is equivalent to an empty parameter list. Except for this special case, a parameter shall not have type cv void.
Date: 2024-11-15.00:00:00

[Accepted as a DR at the November, 2024 meeting.]

(From submission #578.)

Consider:

  struct A {
    void f(this void);
  };

This ought to be an ill-formed parameter of type void.

History
Date User Action Args
2024-12-17 09:54:02adminsetstatus: ready -> dr
2024-11-19 12:01:24adminsetstatus: tentatively ready -> ready
2024-08-16 19:45:15adminsetmessages: + msg7798
2024-08-16 19:45:15adminsetstatus: open -> tentatively ready
2024-07-21 00:00:00admincreate