Skip to content

Commit c01e69f

Browse files
burblebeetkoeppe
authored andcommitted
LWG3819 reference_meows_from_temporary should not use is_meowible
1 parent 20532d2 commit c01e69f

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

source/meta.tex

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,19 +1217,46 @@
12171217
\indexlibraryglobal{reference_constructs_from_temporary}%
12181218
\tcode{template<class T, class U>}\br
12191219
\tcode{struct reference_constructs_from_temporary;} &
1220-
\tcode{conjunction_v<is_reference<T>, is_constructible<T, U>>}
1221-
is \tcode{true}, and
1222-
the initialization \tcode{T t(\exposidnc{VAL}<U>);} binds \tcode{t} to
1223-
a temporary object whose lifetime is extended\iref{class.temporary}. &
1220+
\tcode{T} is a reference type, and
1221+
the initialization \tcode{T t(\exposidnc{VAL}<U>);} is
1222+
well-formed and binds \tcode{t} to
1223+
a temporary object whose lifetime is extended\iref{class.temporary}.
1224+
Access checking is performed as if in
1225+
a context unrelated to \tcode{T} and \tcode{U}.
1226+
Only the validity of the immediate context of
1227+
the variable initialization is considered.
1228+
\begin{tailnote}
1229+
The initialization can result in effects such as
1230+
the instantiation of class template specializations and
1231+
function template specializations,
1232+
the generation of implicitly-defined functions, and so on.
1233+
Such effects are not in the ``immediate context'' and
1234+
can result in the program being ill-formed.
1235+
\end{tailnote}
1236+
&
12241237
\tcode{T} and \tcode{U} shall be
12251238
complete types, \cv{}~\keyword{void}, or arrays of unknown bound. \\ \rowsep
12261239

12271240
\indexlibraryglobal{reference_converts_from_temporary}%
12281241
\tcode{template<class T, class U>}\br
12291242
\tcode{struct reference_converts_from_temporary;} &
1230-
\tcode{conjunction_v<is_reference<T>, is_convertible<U, T>>} is \tcode{true},
1231-
and the initialization \tcode{T t = \exposidnc{VAL}<U>;} binds \tcode{t} to
1232-
a temporary object whose lifetime is extended\iref{class.temporary}. &
1243+
\tcode{T} is a reference type, and
1244+
the initialization \tcode{T t = \exposidnc{VAL}<U>;}
1245+
is well-formed and binds \tcode{t} to
1246+
a temporary object whose lifetime is extended\iref{class.temporary}.
1247+
Access checking is performed as if in
1248+
a context unrelated to \tcode{T} and \tcode{U}.
1249+
Only the validity of the immediate context of
1250+
the variable initialization is considered.
1251+
\begin{tailnote}
1252+
The initialization can result in effects such as
1253+
the instantiation of class template specializations and
1254+
function template specializations,
1255+
the generation of implicitly-defined functions, and so on.
1256+
Such effects are not in the ``immediate context'' and
1257+
can result in the program being ill-formed.
1258+
\end{tailnote}
1259+
&
12331260
\tcode{T} and \tcode{U} shall be
12341261
complete types, \cv{}~\keyword{void}, or arrays of unknown bound. \\ \rowsep
12351262

0 commit comments

Comments
 (0)