Created on 2024-09-22.00:00:00 last changed 1 week ago
CWG 2024-11-08
An alternative phrasing was suggested.
Possible resolution:
Change in 6.7.2 [intro.object] paragraph 1 as follows:
An object is a logical unit of data that occupies storage in the abstract machine (4.1.2 [intro.abstract]). The constructs in a C++ program create, destroy, refer to, access, and manipulate objects. Anobjectobject is created by a definition (6.2 [basic.def]), by a new-expression (7.6.2.8 [expr.new]), by an operation that implicitly creates objects (see below), when implicitly changing the active member of a union (11.5 [class.union]), or when a temporary object is created (7.3.5 [conv.rval], 6.7.7 [class.temporary]).An object occupies a region of storage in its period of construction (11.9.5 [class.cdtor]), throughout its lifetime (6.7.3 [basic.life]), and in its period of destruction (11.9.5 [class.cdtor]).[Note 1: A function is not an object, regardless of whether or not it occupies storage in the way that objects do. —end note]
Prior to P0137R1, the term "object" was defined to be "a region of storage". Currently, the term "object" appears to be missing a definition. The submitter suggests to restore wording similar to "An object is a region of storage that is occupied or released, associated with an object type and certain properties." and disagrees with the resolutions suggested below.
Possible resolution (option 1) [SUPERSEDED]:
Change in 6.7.2 [intro.object] paragraph 1 as follows:
An object is a logical element of the execution model of the abstract machine (4.1.2 [intro.abstract]). The constructs in a C++ program create, destroy, refer to, access, and manipulate objects. Anobjectobject is created by a definition (6.2 [basic.def]), by a new-expression (7.6.2.8 [expr.new]), by an operation that implicitly creates objects (see below), when implicitly changing the active member of a union (11.5 [class.union]), or when a temporary object is created (7.3.5 [conv.rval], 6.7.7 [class.temporary]). An object occupies a region of storage in its period of construction (11.9.5 [class.cdtor]), throughout its lifetime (6.7.3 [basic.life]), and in its period of destruction (11.9.5 [class.cdtor]). [Note 1: A function is not an object, regardless of whether or not it occupies storage in the way that objects do. —end note]
Possible resolution (option 2) [SUPERSEDED]:
Change in 6.7.2 [intro.object] paragraph 1 as follows:
An object is an element of the execution representation of the program in the abstract machine (4.1.2 [intro.abstract]) that represents an instance of an object type. The constructs in a C++ program create, destroy, refer to, access, and manipulate objects. Anobjectobject is created by a definition (6.2 [basic.def]), by a new-expression (7.6.2.8 [expr.new]), by an operation that implicitly creates objects (see below), when implicitly changing the active member of a union (11.5 [class.union]), or when a temporary object is created (7.3.5 [conv.rval], 6.7.7 [class.temporary]). An object occupies a region of storage in its period of construction (11.9.5 [class.cdtor]), throughout its lifetime (6.7.3 [basic.life]), and in its period of destruction (11.9.5 [class.cdtor]). [Note 1: A function is not an object, regardless of whether or not it occupies storage in the way that objects do. —end note]
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-11-09 00:21:39 | admin | set | messages: + msg7890 |
2024-11-09 00:21:39 | admin | set | status: open -> review |
2024-09-22 00:00:00 | admin | create |