Skip to content

CWG2751 Order of destruction for parameters for operator functions #1583

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.

Activity

  1. erichkeane commented on Nov 7, 2023

    @erichkeane
    Collaborator

    EWG discussed CWG2751 during the Tuesday Morning session in Kona. The following poll was taken.

    CWG2751 "Order of destruction for parameters for operator functions" not a defect, the proposed implementation strategy can be picked if the implementation so desires.

    SF F N A SA
    6 6 4 0 0

    Result: Consensus

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

    EWGEvolution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions