Skip to content

[expr.new] new-initializer is specified to be direct-initialization twice #858

@Endilll

Description

@Endilll

Consider [expr.new] paragraph 24:

A new-expression that creates an object of type T initializes that object as follows:
— <...>
— Otherwise, the new-initializer is interpreted according to the initialization rules of [dcl.init] for direct-initialization.

and [dcl.init] paragraph 15:

The initialization that occurs
— <...>
— for a new-initializer ([expr.new]),
— <...>
is called direct-initialization.

This seems to be a normative duplication.

Suggested resolution

Change [expr.new] paragraph 24 as follows:

A new-expression that creates an object of type T initializes that object as follows:
— <...>
— Otherwise, the new-initializer is interpreted according to the initialization rules of [dcl.init] for direct-initialization.
[ Note: In this case new-initializer follows rules for direct-initialization. — end note ]

Alternatively, the note could be omitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions