Skip to content

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

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]);

Activity

  1. jensmaurer commented on Feb 19, 2026

    @jensmaurer
    Member
  2. changed the title [-][temp.deduct.decl] `operator new[]` is missed[/-] [+]CWG3157 [temp.deduct.decl] `operator new[]` is missed[/+] on Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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