From Jason Turner

[conv.rval]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpjtkmhzp6/{from.md → to.md} +21 -0
tmp/tmpjtkmhzp6/{from.md → to.md} RENAMED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Temporary materialization conversion <a id="conv.rval">[[conv.rval]]</a>
2
+
3
+ A prvalue of type `T` can be converted to an xvalue of type `T`. This
4
+ conversion initializes a temporary object ([[class.temporary]]) of type
5
+ `T` from the prvalue by evaluating the prvalue with the temporary object
6
+ as its result object, and produces an xvalue denoting the temporary
7
+ object. `T` shall be a complete type.
8
+
9
+ [*Note 1*: If `T` is a class type (or array thereof), it must have an
10
+ accessible and non-deleted destructor; see 
11
+ [[class.dtor]]. — *end note*]
12
+
13
+ [*Example 1*:
14
+
15
+ ``` cpp
16
+ struct X { int n; };
17
+ int k = X().n; // OK, X() prvalue is converted to xvalue
18
+ ```
19
+
20
+ — *end example*]
21
+