Skip to content

CWG3157 [temp.deduct.decl] operator new[] is missed #838

@frederick-vs-ja

Description

@frederick-vs-ja

Full name of submitter (unless configured in github; will be published with the issue): Jiang An

Reference (section label): [temp.deduct.decl]

Link to reflector thread (if any):

Issue description:

Currently [temp.deduct.decl] p1 only mentions operator new but not operator new[]. Perhaps we should handle operator new[] consistently.

Suggested resolution:

Modify [temp.deduct.decl] p1 as indicated:

  1. [...] This is also done to determine whether a deallocation function template specialization matches a placement operator new allocation function ([basic.stc.dynamic.deallocation], [expr.new]). In all these cases, P is the type of the function template being considered as a potential match and A is either the function type from the declaration or the type of the deallocation function that would match the placement operator new allocation function as described in [expr.new]. [...]

Modify [temp.func.order] p1.3 as indicated:

(1.3) - when a placement operator delete deallocation function that is a function template specialization is selected to match a placement operator new allocation function ([basic.stc.dynamic.deallocation], [expr.new]);

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