Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 66d33aa

Browse filesBrowse files
authored
book: markdown style fixes (#243)
1 parent 4dfd34e commit 66d33aa
Copy full SHA for 66d33aa

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎book/en-us/03-runtime.md

Copy file name to clipboardExpand all lines: book/en-us/03-runtime.md
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.