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

Created on 2024-07-21.00:00:00 last changed 2 months 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-08-16.19:45:15

(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-08-16 19:45:15adminsetmessages: + msg7798
2024-08-16 19:45:15adminsetstatus: open -> tentatively ready
2024-07-21 00:00:00admincreate