This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 113d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-03-20


713. Unclear note about cv-qualified function types

Section: 9.3.4.6  [dcl.fct]     Status: CD2     Submitter: Doug Gregor     Date: 11 September, 2008

[Voted into WP at October, 2009 meeting.]

7.3.6 [conv.qual] paragraph 3 consists of a note reading,

[Note: Function types (including those used in pointer to member function types) are never cv-qualified (9.3.4.6 [dcl.fct]). —end note]

However, 9.3.4.6 [dcl.fct] paragraph 7 says,

A cv-qualifier-seq shall only be part of the function type...

This sounds like a contradiction, although formally it is not: a “function type with a cv-qualifier-seq” is not a “cv-qualified function type.” It would be helpful to make this distinction clearer.

Proposed resolution (March, 2009):

  1. Change 9.3.4.6 [dcl.fct] paragraph 7 as follows:

  2. A cv-qualifier-seq shall only be part of the function type for a non-static member function, the function type to which a pointer to member refers, or the top-level function type of a function typedef declaration. [Note: A function type that has a cv-qualifier-seq is not a cv-qualified type; there are no cv-qualified function types. —end note] The effect of a cv-qualifier-seq in a function declarator...
  3. Change 6.8.5 [basic.type.qualifier] paragraph 3 as follows:

  4. ...See 9.3.4.6 [dcl.fct] and _N4868_.11.4.3.2 [class.this] regarding cv-qualified function types that have cv-qualifiers.