|
1217 | 1217 | \indexlibraryglobal{reference_constructs_from_temporary}%
|
1218 | 1218 | \tcode{template<class T, class U>}\br
|
1219 | 1219 | \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 | +& |
1224 | 1237 | \tcode{T} and \tcode{U} shall be
|
1225 | 1238 | complete types, \cv{}~\keyword{void}, or arrays of unknown bound. \\ \rowsep
|
1226 | 1239 |
|
1227 | 1240 | \indexlibraryglobal{reference_converts_from_temporary}%
|
1228 | 1241 | \tcode{template<class T, class U>}\br
|
1229 | 1242 | \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 | +& |
1233 | 1260 | \tcode{T} and \tcode{U} shall be
|
1234 | 1261 | complete types, \cv{}~\keyword{void}, or arrays of unknown bound. \\ \rowsep
|
1235 | 1262 |
|
|
0 commit comments