Skip to content

Commit 5d544ae

Browse files
timsong-cpptkoeppe
authored andcommitted
[range.nonprop.cache] Clarify emplace-deref for prvalues. (#4732)
A new note explains that `emplace-deref` requires implementations to avoid materialization of the result of `*i` before the initialization. This is implied by the normatively expressed requirement in terms of an invented initialization of a variable, but is easily overlooked.
1 parent d8a89d1 commit 5d544ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/ranges.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,6 +3216,10 @@
32163216
\mandates
32173217
The declaration \tcode{T t(*i);} is well-formed
32183218
for some invented variable \tcode{t}.
3219+
\begin{note}
3220+
If \tcode{*i} is a prvalue of type \cv{} \tcode{T},
3221+
there is no requirement that it is movable\iref{dcl.init.general}.
3222+
\end{note}
32193223

32203224
\effects
32213225
Calls \tcode{reset()}.

0 commit comments

Comments
 (0)