Title
Remove redundant restrictions on class and enum definitions
Status
open
Section
8.1 [stmt.pre]
Submitter
US

Created on 2025-10-01.00:00:00 last changed 3 days ago

Messages

Date: 2025-10-10.20:53:38

Suggested resolution:

Change in 8.1 [stmt.pre] paragraph 8 as follows:

In the decl-specifier-seq of a condition or of a for-range-declaration, including that of any structured-binding-declaration of the condition, each decl-specifier shall be either a type-specifier or constexpr. The decl-specifier-seq of a for-range-declaration shall not define a class or enumeration.
Date: 2025-10-01.00:00:00
N5028 comment USĀ 35-066

Subclause 8.1 [stmt.pre] paragraph 8 has the following redundant specification:

In the decl-specifier-seq of a condition or of a for-range-declaration, including that of any structured-binding-declaration of the condition, each decl-specifier shall be either a type-specifier or constexpr. The decl-specifier-seq of a for-range-declaration shall not define a class or enumeration.

The second sentence is redundant, because a type-specifier (as opposed to a defining-type-specifier) cannot define a class or enumeration.

History
Date User Action Args
2025-10-10 20:53:38adminsetmessages: + msg8144
2025-10-01 00:00:00admincreate