Skip to content

CWG2751 Order of destruction for parameters for operator functions #1583

@jensmaurer

Description

@jensmaurer

In an ABI with callee-cleanup, the following causes implementation hardship because the order of construction of the parameters for the two overloaded operators is required to be different, causing conflicting requirements on the order of parameter destruction.

  void operator<<(A, B);
  void operator+=(A, B);
  void (*p)(A, B) = cond ? &operator<< : &operator+=;

See CWG2751 for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EWGEvolution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions