Title
What is "access and ambiguity control"?
Status
drwp
Section
7.6.2.9 [expr.delete]
Submitter
CWG

Created on 2023-06-12.00:00:00 last changed 8 months ago

Messages

Date: 2023-08-26.21:49:54

Proposed resolution (approved by CWG 2023-08-25):

  1. Change in 7.6.2.9 [expr.delete] paragraph 6 as follows:

    If the value of the operand of the delete-expression is not a null pointer value and the selected deallocation function (see below) is not a destroying operator delete, evaluating the delete-expression will invoke invokes the destructor (if any) for the object or the elements of the array being deleted. The destructor shall be accessible from the point where the delete-expression appears. In the case of an array, the elements will be are destroyed in order of decreasing address (that is, in reverse order of the completion of their constructor; see 11.9.3 [class.base.init]).
  2. Change in 7.6.2.9 [expr.delete] paragraph 10

    If more than one deallocation function is found, the The deallocation function to be called is selected as follows:
    • ...

    Unless the deallocation function is selected at the point of definition of the dynamic type's virtual destructor, the selected deallocation function shall be accessible from the point where the delete-expression appears.

  3. Remove 7.6.2.9 [expr.delete] paragraph 12:

    Access and ambiguity control are done for both the deallocation function and the destructor (11.4.7 [class.dtor], 11.4.11 [class.free]).
Date: 2023-11-15.00:00:00

[Accepted as a DR at the November, 2023 meeting.]

Subclause 7.6.2.9 [expr.delete] paragraph 12 specifies:

Access and ambiguity control are done for both the deallocation function and the destructor (11.4.7 [class.dtor], 11.4.11 [class.free]).

It is unclear what that means. In particular, ambiguity checking is part of overload resolution, and access checking requires a point of reference.

History
Date User Action Args
2024-04-05 21:43:46adminsetstatus: dr -> drwp
2023-12-19 10:15:28adminsetstatus: ready -> dr
2023-11-10 14:27:11adminsetstatus: tentatively ready -> ready
2023-08-26 21:49:54adminsetmessages: + msg7401
2023-08-26 21:49:54adminsetstatus: open -> tentatively ready
2023-06-12 00:00:00admincreate