Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhqu1148980644 authored Mar 18, 2019
1 parent 35c524d commit 292898a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ch16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,9 @@ More safer solution: <[Better `sum`](ex16_41_sum.cpp)>
> (c) g(i * ci);
> ```
- (a) T: `int&` val: int& && -> int &
- (b) T: `const int&` val: const int& && -> const int &
- (c) T: `int` val: int &&
- (a) T: `int&` val: `int& &&` -> `int &`
- (b) T: `const int&` val: `const int& &&` -> `const int &`
- (c) T: `int` val: `int &&`
> When we pass an lvalue `int` to a function parameter that is an rvalue reference to a template type parameter `T&&`, the compiler deduces the template type parameter as the argument’s lvalue reference type `int &`.
Expand Down

0 comments on commit 292898a

Please sign in to comment.