Title
Pointer to array of unknown bound in parameter declarations
Status
dup
Section
9.3.4.6 [dcl.fct]
Submitter
Daveed Vandevoorde

Created on 2005-11-22.00:00:00 last changed 114 months ago

Messages

Date: 2014-11-15.00:00:00

Rationale (November, 2014):

This issue is a duplicate of issue 393.

Date: 2022-11-20.07:54:16

The current wording of 9.3.4.6 [dcl.fct] paragraph 6 encompasses more than it should:

If the type of a parameter includes a type of the form “pointer to array of unknown bound of T” or “reference to array of unknown bound of T,” the program is ill-formed. [Footnote: This excludes parameters of type “ptr-arr-seq T2” where T2 is “pointer to array of unknown bound of T” and where ptr-arr-seq means any sequence of “pointer to” and “array of” derived declarator types. This exclusion applies to the parameters of the function, and if a parameter is a pointer to function or pointer to member function then to its parameters also, etc. —end footnote]

The normative wording (contrary to the intention expressed in the footnote) excludes declarations like

    template<class T> struct S {};
    void f(S<int (*)[]>);

and

    struct S {};
    void f(int(*S::*)[]);

but not

    struct S {};
    void f(int(S::*)[]);
History
Date User Action Args
2014-11-24 00:00:00adminsetmessages: + msg5299
2014-11-24 00:00:00adminsetstatus: open -> dup
2005-11-22 00:00:00admincreate