Skip to content

Commit 66d33aa

Browse files
authored
book: markdown style fixes (changkun#243)
1 parent 4dfd34e commit 66d33aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/en-us/03-runtime.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ both lvalue and rvalue. But follow the rules below:
529529
| T&& | rvalue ref | T&& |
530530
531531
Therefore, the use of `T&&` in a template function may not be able to make an rvalue reference, and when a lvalue is passed, a reference to this function will be derived as an lvalue.
532-
More precisely, ** no matter what type of reference the template parameter is, the template parameter can be derived as a right reference type** if and only if the argument type is a right reference.
532+
More precisely, **no matter what type of reference the template parameter is, the template parameter can be derived as a right reference type** if and only if the argument type is a right reference.
533533
This makes `v` successful delivery of lvalues.
534534
535535
Perfect forwarding is based on the above rules. The so-called perfect forwarding is to let us pass the parameters,
@@ -586,7 +586,7 @@ static_cast<T&&> param passing: lvalue reference
586586
Regardless of whether the pass parameter is an lvalue or an rvalue, the normal pass argument will forward the argument as an lvalue.
587587
So `std::move` will always accept an lvalue, which forwards the call to `reference(int&&)` to output the rvalue reference.
588588

589-
Only `std::forward` does not cause any extra copies and ** perfectly forwards ** (passes) the arguments of the function to other functions that are called internally.
589+
Only `std::forward` does not cause any extra copies and **perfectly forwards** (passes) the arguments of the function to other functions that are called internally.
590590

591591
`std::forward` is the same as `std::move`, and nothing is done. `std::move` simply converts the lvalue to the rvalue.
592592
`std::forward` is just a simple conversion of the parameters. From the point of view of the phenomenon,

0 commit comments

Comments
 (0)