|
5472 | 5472 | operator void**() const noexcept; |
5473 | 5473 |
|
5474 | 5474 | private: |
5475 | | - Smart& s; // \expos |
5476 | | - tuple<Args...> a; // \expos |
5477 | | - Pointer p; // \expos |
| 5475 | + Smart& @\exposid{s}@; // \expos |
| 5476 | + tuple<Args...> @\exposid{a}@; // \expos |
| 5477 | + Pointer @\exposid{p}@; // \expos |
5478 | 5478 | }; |
5479 | 5479 | } |
5480 | 5480 | \end{codeblock} |
|
5508 | 5508 | \begin{itemdescr} |
5509 | 5509 | \pnum |
5510 | 5510 | \effects |
5511 | | -Initializes \tcode{s} with \tcode{smart}, |
5512 | | -\tcode{a} with \tcode{std::forward<Args>(args)...}, and |
5513 | | -value-initializes \tcode{p}. |
| 5511 | +Initializes \exposid{s} with \tcode{smart}, |
| 5512 | +\exposid{a} with \tcode{std::forward<Args>(args)...}, and |
| 5513 | +value-initializes \exposid{p}. |
5514 | 5514 | Then, equivalent to: |
5515 | 5515 | \begin{itemize} |
5516 | 5516 | \item |
5517 | 5517 | % pretend to \item that there is real text here, but undo the vertical spacing |
5518 | 5518 | \mbox{}\vspace{-\baselineskip}\vspace{-\parskip} |
5519 | 5519 | \begin{codeblock} |
5520 | | -s.reset(); |
| 5520 | +@\exposid{s}@.reset(); |
5521 | 5521 | \end{codeblock} |
5522 | | -if the expression \tcode{s.reset()} is well-formed; |
| 5522 | +if the expression \tcode{\exposid{s}.reset()} is well-formed; |
5523 | 5523 |
|
5524 | 5524 | \item |
5525 | 5525 | otherwise, |
5526 | 5526 | \begin{codeblock} |
5527 | | -s = Smart(); |
| 5527 | +@\exposid{s}@ = Smart(); |
5528 | 5528 | \end{codeblock} |
5529 | 5529 | if \tcode{is_constructible_v<Smart>} is \tcode{true}; |
5530 | 5530 |
|
|
5562 | 5562 | % pretend to \item that there is real text here, but undo the vertical spacing |
5563 | 5563 | \mbox{}\vspace{-\baselineskip}\vspace{-\parskip} |
5564 | 5564 | \begin{codeblock} |
5565 | | -if (p) { |
| 5565 | +if (@\exposid{p}@) { |
5566 | 5566 | apply([&](auto&&... args) { |
5567 | | - s.reset(static_cast<SP>(p), std::forward<Args>(args)...); }, std::move(a)); |
| 5567 | + @\exposid{s}@.reset(static_cast<SP>(@\exposid{p}@), std::forward<Args>(args)...); }, std::move(@\exposid{a}@)); |
5568 | 5568 | } |
5569 | 5569 | \end{codeblock} |
5570 | 5570 | if the expression |
5571 | | -\tcode{s.reset(static_cast<SP>(p), std::forward<Args>(args)...)} |
| 5571 | +\tcode{\exposid{s}.reset(static_cast<SP>(\exposid{p}), std::forward<Args>(args)...)} |
5572 | 5572 | is well-\linebreak formed; |
5573 | 5573 | \item |
5574 | 5574 | otherwise, |
5575 | 5575 | \begin{codeblock} |
5576 | | -if (p) { |
| 5576 | +if (@\exposid{p}@) { |
5577 | 5577 | apply([&](auto&&... args) { |
5578 | | - s = Smart(static_cast<SP>(p), std::forward<Args>(args)...); }, std::move(a)); |
| 5578 | + @\exposid{s}@ = Smart(static_cast<SP>(@\exposid{p}@), std::forward<Args>(args)...); }, std::move(@\exposid{a}@)); |
5579 | 5579 | } |
5580 | 5580 | \end{codeblock} |
5581 | 5581 | if \tcode{is_constructible_v<Smart, SP, Args...>} is \tcode{true}; |
|
5595 | 5595 |
|
5596 | 5596 | \pnum |
5597 | 5597 | \returns |
5598 | | -\tcode{addressof(const_cast<Pointer\&>(p))}. |
| 5598 | +\tcode{addressof(const_cast<Pointer\&>(\exposid{p}))}. |
5599 | 5599 | \end{itemdescr} |
5600 | 5600 |
|
5601 | 5601 | \begin{itemdecl} |
|
5620 | 5620 | A pointer value \tcode{v} such that: |
5621 | 5621 | \begin{itemize} |
5622 | 5622 | \item |
5623 | | -the initial value \tcode{*v} is equivalent to \tcode{static_cast<void*>(p)} and |
| 5623 | +the initial value \tcode{*v} is equivalent to \tcode{static_cast<void*>(\exposid{p})} and |
5624 | 5624 | \item |
5625 | 5625 | any modification of \tcode{*v} |
5626 | 5626 | that is not followed by a subsequent modification of \tcode{*this} |
5627 | | -affects the value of \tcode{p} during the destruction of \tcode{*this}, |
5628 | | -such that \tcode{static_cast<void*>(p) == *v}. |
| 5627 | +affects the value of \exposid{p} during the destruction of \tcode{*this}, |
| 5628 | +such that \tcode{static_cast<void*>(\exposid{p}) == *v}. |
5629 | 5629 | \end{itemize} |
5630 | 5630 |
|
5631 | 5631 | \pnum |
|
0 commit comments