Title
Are exposition-only classes considered specified for the purpose of `final`?
Status
new
Section
[derivation]
Submitter
Jiang An

Created on 2025-04-28.00:00:00 last changed 6 days ago

Messages

Date: 2025-05-04.10:54:47

Proposed resolution:

This wording is relative to N5008.

  1. Modify [derivation] as indicated:

    -4- All types specified in the C++ standard library shall be non-`final` types unless otherwise specified. Exposition-only classes ([expos.only.entity]) are not considered specified for the purpose of `final`.

Date: 2025-04-28.00:00:00

Currently, iterator and sentinel types of several views are exposition-only in the standard wording, and none of them is specified to be `final`. These types are arguably required to be non-final due to [derivation] p4 because it's possible to say they are specified except for names.

However, libc++ marks `join_view`'s iterator `final` for some reasons (https://reviews.llvm.org/D142811#inline-1383022). Perhaps we should clarify that the `final`-ity of exposition-only class is unspecified.

History
Date User Action Args
2025-05-04 10:54:47adminsetmessages: + msg14742
2025-04-28 00:00:00admincreate