-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Full name of submitter (unless configured in github; will be published with the issue): Jay Ghiron
Reference (section label): [expr.prim.lambda.closure]/1
The type of a lambda-expression (which is also the type of the closure object) is a unique, unnamed non-union class type, called the closure type, whose properties are described below.
Issue description:
It is not stated that the closure type must be non-final. Inheriting from a lambda is frequently used with std::visit to create ad hoc overload sets, and presumably the purpose of specifying non-union classes is to allow for this.
Suggested resolution:
Modify [expr.prim.lambda.closure]/1 as follows:
The type of a lambda-expression (which is also the type of the closure object) is a unique, unnamed non-union non-final class type, called the closure type, whose properties are described below.
Where the word final is colored as a keyword, as it is in [derivation]/4.