Created on 2018-06-09.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4762.
Modify [defns.prog.def.type] as follows:
program-defined type
non-closure class type or enumeration type that is not part of the C++ standard library and not defined by the implementation, or a closure type of a non-implementation-provided lambda expression, or an instantiation of a program-defined specialization
[ 2018-11 San Diego Thursday night issue processing ]
Status to Ready.
[ 2018-08-23 Batavia Issues processing ]
Updated wording
[ 2018-08-14 Casey provides additional discussion and a Proposed Resolution ]
We use the term "program-defined" in the library specification to ensure that two users cannot create conflicts in a component in namespace std by specifying different behaviors for the same type. For example, we allow users to specialize common_type when at least one of the parameters is a program-defined type. Since two users cannot define the same program-defined type, this rule prevents two users (or libraries) defining the same specialization of std::common_type.
Since it's guaranteed that even distinct utterances of identical lambda expressions produce closures with distinct types ([expr.prim.lambda.closure]), adding closure types to our term "program-defined type" is consistent with the intended use despite that such types are technically defined by the implementation.
Previous resolution [SUPERSEDED]:
This wording is relative to N4762.
Modify [defns.prog.def.type] as follows:
program-defined type
class type or enumeration type that is not part of the C++ standard library and not defined by the implementation (except for closure types ([expr.prim.lambda.closure]) for program-defined lambda expressions), or an instantiation of a program-defined specialization
[ 2018-06-23 after reflector discussion ]
Priority set to 2
The description of closure types in [expr.prim.lambda.closure] says:
An implementation may define the closure type differently […]
The proposed resolution to LWG 2139 defines a "program-defined type" to be a
class type or enumeration type that is not part of the C++ standard library and not defined by the implementation, or an instantiation of a program-defined specialization
I am not sure that the intent of whether closure types are or are not program-defined types is clearly conveyed by the wording.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2019-02-26 17:40:23 | admin | set | status: voting -> wp |
2019-01-21 04:50:04 | admin | set | status: ready -> voting |
2018-11-12 05:21:03 | admin | set | messages: + msg10220 |
2018-11-12 05:21:03 | admin | set | status: new -> ready |
2018-08-27 14:22:44 | admin | set | messages: + msg10135 |
2018-08-14 19:51:17 | admin | set | messages: + msg10069 |
2018-08-14 19:51:17 | admin | set | messages: + msg10068 |
2018-06-25 00:47:25 | admin | set | messages: + msg9985 |
2018-06-09 00:00:00 | admin | create |