From Jason Turner

[res.on.arguments]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpjkfmxwcx/{from.md → to.md} +12 -11
tmp/tmpjkfmxwcx/{from.md → to.md} RENAMED
@@ -9,18 +9,19 @@ the C++ standard library, unless explicitly stated otherwise.
9
  - If a function argument is described as being an array, the pointer
10
  actually passed to the function shall have a value such that all
11
  address computations and accesses to objects (that would be valid if
12
  the pointer did point to the first element of such an array) are in
13
  fact valid.
14
- - If a function argument binds to an rvalue reference parameter, the
15
  implementation may assume that this parameter is a unique reference to
16
- this argument. \[*Note 1*: If the parameter is a generic parameter of
17
- the form `T&&` and an lvalue of type `A` is bound, the argument binds
18
- to an lvalue reference [[temp.deduct.call]] and thus is not covered by
19
- the previous sentence. *end note*] \[*Note 2*: If a program casts
20
- an lvalue to an xvalue while passing that lvalue to a library function
21
- (e.g., by calling the function with the argument `std::move(x)`), the
22
- program is effectively asking that function to treat that lvalue as a
23
- temporary object. The implementation is free to optimize away aliasing
24
- checks which might be needed if the argument was an
25
- lvalue. *end note*]
 
26
 
 
9
  - If a function argument is described as being an array, the pointer
10
  actually passed to the function shall have a value such that all
11
  address computations and accesses to objects (that would be valid if
12
  the pointer did point to the first element of such an array) are in
13
  fact valid.
14
+ - If a function argument is bound to an rvalue reference parameter, the
15
  implementation may assume that this parameter is a unique reference to
16
+ this argument, except that the argument passed to a move-assignment
17
+ operator may be a reference to `*this` [[lib.types.movedfrom]].
18
+ \[*Note 1*: If the type of a parameter is a forwarding reference
19
+ [[temp.deduct.call]] that is deduced to an lvalue reference type, then
20
+ the argument is not bound to an rvalue reference. *end note*]
21
+ \[*Note 2*: If a program casts an lvalue to an xvalue while passing
22
+ that lvalue to a library function (e.g., by calling the function with
23
+ the argument `std::move(x)`), the program is effectively asking that
24
+ function to treat that lvalue as a temporary object. The
25
+ implementation is free to optimize away aliasing checks which would
26
+ possibly be needed if the argument was an lvalue. — *end note*]
27