|
5712 | 5712 | operator void**() const noexcept; |
5713 | 5713 |
|
5714 | 5714 | private: |
5715 | | - Smart& s; // \expos |
5716 | | - tuple<Args...> a; // \expos |
5717 | | - Pointer p; // \expos |
| 5715 | + Smart& @\exposid{s}@; // \expos |
| 5716 | + tuple<Args...> @\exposid{a}@; // \expos |
| 5717 | + Pointer @\exposid{p}@; // \expos |
5718 | 5718 | }; |
5719 | 5719 | } |
5720 | 5720 | \end{codeblock} |
|
5745 | 5745 | \begin{itemdescr} |
5746 | 5746 | \pnum |
5747 | 5747 | \effects |
5748 | | -Initializes \tcode{s} with \tcode{smart}, |
5749 | | -\tcode{a} with \tcode{std::forward<Args>(args)...}, and |
5750 | | -\tcode{p} to either |
| 5748 | +Initializes \exposid{s} with \tcode{smart}, |
| 5749 | +\exposid{a} with \tcode{std::forward<Args>(args)...}, and |
| 5750 | +\exposid{p} to either |
5751 | 5751 | \begin{itemize} |
5752 | 5752 | \item \tcode{smart} if \tcode{is_pointer_v<Smart>} is \tcode{true}, |
5753 | 5753 | \item otherwise, \tcode{smart.get()}. |
5754 | 5754 | \end{itemize} |
5755 | 5755 |
|
5756 | 5756 | \pnum |
5757 | 5757 | \remarks |
5758 | | -An implementation can call \tcode{s.release()}. |
| 5758 | +An implementation can call \tcode{\exposid{s}.release()}. |
5759 | 5759 |
|
5760 | 5760 | \pnum |
5761 | 5761 | \begin{note} |
|
5777 | 5777 | \tcode{\exposid{POINTER_OF_OR}(Smart, Pointer)}\iref{memory.general}. |
5778 | 5778 |
|
5779 | 5779 | \pnum |
5780 | | -Let \exposid{release-statement} be \tcode{s.release();} |
5781 | | -if an implementation does not call \tcode{s.release()} in the constructor. |
| 5780 | +Let \exposid{release-statement} be \tcode{\exposid{s}.release();} |
| 5781 | +if an implementation does not call \tcode{\exposid{s}.release()} in the constructor. |
5782 | 5782 | Otherwise, it is empty. |
5783 | 5783 |
|
5784 | 5784 | \pnum |
|
5790 | 5790 | \mbox{}\vspace{-\baselineskip}\vspace{-\parskip} |
5791 | 5791 | \begin{codeblock} |
5792 | 5792 | apply([&](auto&&... args) { |
5793 | | - s = Smart(static_cast<SP>(p), std::forward<Args>(args)...); }, std::move(a)); |
| 5793 | + @\exposid{s}@ = Smart(static_cast<SP>(@\exposid{p}@), std::forward<Args>(args)...); }, std::move(@\exposid{a}@)); |
5794 | 5794 | \end{codeblock} |
5795 | 5795 | if \tcode{is_pointer_v<Smart>} is \tcode{true}; |
5796 | 5796 | \item |
5797 | 5797 | otherwise, |
5798 | 5798 | \begin{codeblock} |
5799 | 5799 | @\exposid{release-statement}@; |
5800 | | -if (p) { |
| 5800 | +if (@\exposid{p}@) { |
5801 | 5801 | apply([&](auto&&... args) { |
5802 | | - s.reset(static_cast<SP>(p), std::forward<Args>(args)...); }, std::move(a)); |
| 5802 | + @\exposid{s}@.reset(static_cast<SP>(@\exposid{p}@), std::forward<Args>(args)...); }, std::move(@\exposid{a}@)); |
5803 | 5803 | } |
5804 | 5804 | \end{codeblock} |
5805 | 5805 | if the expression |
5806 | | -\tcode{s.reset(static_cast<SP>(p), std::forward<Args>(args)...)} |
| 5806 | +\tcode{\exposid{s}.reset(static_cast<SP>(\exposid{p}), std::forward<Args>(args)...)} |
5807 | 5807 | is well-\newline formed; |
5808 | 5808 | \item |
5809 | 5809 | otherwise, |
5810 | 5810 | \begin{codeblock} |
5811 | 5811 | @\exposid{release-statement}@; |
5812 | | -if (p) { |
| 5812 | +if (@\exposid{p}@) { |
5813 | 5813 | apply([&](auto&&... args) { |
5814 | | - s = Smart(static_cast<SP>(p), std::forward<Args>(args)...); }, std::move(a)); |
| 5814 | + @\exposid{s}@ = Smart(static_cast<SP>(@\exposid{p}@), std::forward<Args>(args)...); }, std::move(@\exposid{a}@)); |
5815 | 5815 | } |
5816 | 5816 | \end{codeblock} |
5817 | 5817 | if \tcode{is_constructible_v<Smart, SP, Args...>} is \tcode{true}; |
|
5831 | 5831 |
|
5832 | 5832 | \pnum |
5833 | 5833 | \returns |
5834 | | -\tcode{addressof(const_cast<Pointer\&>(p))}. |
| 5834 | +\tcode{addressof(const_cast<Pointer\&>(\exposid{p}))}. |
5835 | 5835 | \end{itemdescr} |
5836 | 5836 |
|
5837 | 5837 | \begin{itemdecl} |
|
5856 | 5856 | A pointer value \tcode{v} such that: |
5857 | 5857 | \begin{itemize} |
5858 | 5858 | \item |
5859 | | -the initial value \tcode{*v} is equivalent to \tcode{static_cast<void*>(p)} and |
| 5859 | +the initial value \tcode{*v} is equivalent to \tcode{static_cast<void*>(\exposid{p})} and |
5860 | 5860 | \item |
5861 | 5861 | any modification of \tcode{*v} |
5862 | 5862 | that is not followed by subsequent modification of \tcode{*this} |
5863 | | -affects the value of \tcode{p} during the destruction of \tcode{*this}, |
5864 | | -such that \tcode{static_cast<void*>(p) == *v}. |
| 5863 | +affects the value of \exposid{p} during the destruction of \tcode{*this}, |
| 5864 | +such that \tcode{static_cast<void*>(\exposid{p}) == *v}. |
5865 | 5865 | \end{itemize} |
5866 | 5866 |
|
5867 | 5867 | \pnum |
|
0 commit comments