Init
This commit is contained in:
29
cppdraft/conv/rval.md
Normal file
29
cppdraft/conv/rval.md
Normal file
@@ -0,0 +1,29 @@
|
||||
[conv.rval]
|
||||
|
||||
# 7 Expressions [[expr]](./#expr)
|
||||
|
||||
## 7.3 Standard conversions [[conv]](conv#rval)
|
||||
|
||||
### 7.3.5 Temporary materialization conversion [conv.rval]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/expressions.tex#L734)
|
||||
|
||||
A prvalue of type T can be converted to an xvalue of type T[.](#1.sentence-1)
|
||||
|
||||
This conversion initializes a temporary object ([[class.temporary]](class.temporary "6.8.7 Temporary objects")) of type T from the prvalue
|
||||
by evaluating the prvalue with the temporary object as its result object,
|
||||
and produces an xvalue denoting the temporary object[.](#1.sentence-2)
|
||||
|
||||
T shall be a complete type[.](#1.sentence-3)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
If T is a class type (or array thereof),
|
||||
it must have an accessible and non-deleted destructor;
|
||||
see [[class.dtor]](class.dtor "11.4.7 Destructors")[.](#1.sentence-4)
|
||||
|
||||
â *end note*]
|
||||
|
||||
[*Example [1](#example-1)*: struct X { int n; };int k = X().n; // OK, X() prvalue is converted to xvalue â *end example*]
|
||||
Reference in New Issue
Block a user