|
5790 | 5790 | null pointer value
|
5791 | 5791 | and the selected deallocation function (see below)
|
5792 | 5792 | is not a destroying operator delete,
|
5793 |
| -the \grammarterm{delete-expression} will invoke the |
| 5793 | +evaluating the \grammarterm{delete-expression} invokes the |
5794 | 5794 | destructor (if any) for the object or the elements of the array being
|
5795 |
| -deleted. In the case of an array, the elements will be destroyed in |
| 5795 | +deleted. |
| 5796 | +The destructor shall be accessible from the point where |
| 5797 | +the \grammarterm{delete-expression} appears. |
| 5798 | +In the case of an array, the elements are destroyed in |
5796 | 5799 | order of decreasing address (that is, in reverse order of the completion
|
5797 | 5800 | of their constructor; see~\ref{class.base.init}).
|
5798 | 5801 |
|
|
5873 | 5876 | \end{note}
|
5874 | 5877 |
|
5875 | 5878 | \pnum
|
5876 |
| -If more than one deallocation function is found, |
5877 |
| -the function to be called is selected as follows: |
| 5879 | +The deallocation the function to be called is selected as follows: |
5878 | 5880 | \begin{itemize}
|
5879 | 5881 | \item
|
5880 | 5882 | If any of the deallocation functions is a destroying operator delete,
|
|
5903 | 5905 | whether a deallocation function with a parameter of type \tcode{std::size_t}
|
5904 | 5906 | is selected.
|
5905 | 5907 | \end{itemize}
|
| 5908 | +Unless the deallocation function is selected |
| 5909 | +at the point of definition of the dynamic type's virtual destructor, |
| 5910 | +the selected deallocation function shall be accessible |
| 5911 | +from the point where the \grammarterm{delete-expression} appears. |
5906 | 5912 |
|
5907 | 5913 | \pnum
|
5908 | 5914 | For a single-object delete expression,
|
|
5956 | 5962 | the behavior is undefined\iref{new.delete.single,new.delete.array}.
|
5957 | 5963 | \end{note}
|
5958 | 5964 |
|
5959 |
| -\pnum |
5960 |
| -Access and ambiguity control are done for both the deallocation function |
5961 |
| -and the destructor\iref{class.dtor,class.free}. |
5962 |
| - |
5963 | 5965 | \rSec2[expr.cast]{Explicit type conversion (cast notation)}%
|
5964 | 5966 | \indextext{expression!cast|(}
|
5965 | 5967 |
|
|
0 commit comments