Skip to content

RU008 [class.cdtor].2 Clarify value of *this during construction #8

@wg21bot

Description

@wg21bot

Clarify that *this in constructors could not alias with reference input parameters of the same type. This is useful for optimizing all the constructors of all the classes.

Proposed change:
Apply the following changes to the [class.cdtor] paragraph 2:
During the construction of an object, if the value of the object or any of its subobjects is accessed through a glvalue that is not obtained, directly or indirectly, from the constructor's this pointer, the value of the object or subobject thus obtained is unspecified undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EWGEvolutionSG12Undefined behaviorrejectedNo consensus for a change.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions