vault backup: 2022-06-08 14:32:41
Affected files: .obsidian/workspace 02. PARA/03. Resources(資源)/C++17/lvalue.md 02. PARA/03. Resources(資源)/C++17/rvalue.md 02. PARA/03. Resources(資源)/git/submodule.md
This commit is contained in:
14
.obsidian/workspace
vendored
14
.obsidian/workspace
vendored
@@ -10,7 +10,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "02. PARA/03. Resources(資源)/C++17/rvalue.md",
|
"file": "02. PARA/03. Resources(資源)/git/submodule.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": true
|
"source": true
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "02. PARA/03. Resources(資源)/C++17/rvalue.md"
|
"file": "02. PARA/03. Resources(資源)/git/submodule.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "02. PARA/03. Resources(資源)/C++17/rvalue.md",
|
"file": "02. PARA/03. Resources(資源)/git/submodule.md",
|
||||||
"collapseAll": true,
|
"collapseAll": true,
|
||||||
"extraContext": true,
|
"extraContext": true,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@@ -125,15 +125,15 @@
|
|||||||
},
|
},
|
||||||
"active": "94f0e8a81af6c9e2",
|
"active": "94f0e8a81af6c9e2",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"02. PARA/03. Resources(資源)/git/submodule.md",
|
||||||
|
"02. PARA/03. Resources(資源)/git.md",
|
||||||
"02. PARA/03. Resources(資源)/C++17/rvalue.md",
|
"02. PARA/03. Resources(資源)/C++17/rvalue.md",
|
||||||
|
"02. PARA/03. Resources(資源)/C++17/lvalue.md",
|
||||||
"00. TOP/01. TODO.md",
|
"00. TOP/01. TODO.md",
|
||||||
"02. PARA/01. Project(專案)/008. Sentinel.md",
|
"02. PARA/01. Project(專案)/008. Sentinel.md",
|
||||||
"02. PARA/03. Resources(資源)/FFMPEG/01. Setup.md",
|
"02. PARA/03. Resources(資源)/FFMPEG/01. Setup.md",
|
||||||
"02. PARA/03. Resources(資源)/FFMPEG/00. Introduction.md",
|
"02. PARA/03. Resources(資源)/FFMPEG/00. Introduction.md",
|
||||||
"02. PARA/03. Resources(資源)/FFMpeg.md",
|
"02. PARA/03. Resources(資源)/FFMpeg.md",
|
||||||
"02. PARA/03. Resources(資源)/99. templates/日記.md",
|
"02. PARA/03. Resources(資源)/99. templates/日記.md"
|
||||||
"01. Daily/2022-06-06(週一).md",
|
|
||||||
"02. PARA/03. Resources(資源)/Qt.md",
|
|
||||||
"02. PARA/03. Resources(資源)/C++17/智慧指標.md"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
|
lvalue 是指:
|
||||||
- 等號左邊的值
|
- 等號左邊的值
|
||||||
- 「有固定address」的變數
|
- 可以被「取址」的變數
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
|
rvalue 是指:
|
||||||
- 等號右邊的值
|
- 等號右邊的值
|
||||||
- 臨時的值,例如運算的結果
|
- 臨時的值,例如運算的結果
|
||||||
- 無法被取址(address-of)的物件
|
- 無法被取址(address-of)的物件
|
||||||
|
|
||||||
# rvalue參考
|
|
||||||
可以用`&&`來參考rvalue。例如:
|
可以用`&&`來參考rvalue。例如:
|
||||||
```
|
```cpp
|
||||||
int c{5};
|
int c{5};
|
||||||
int&& rtepm {c + 3};
|
int&& rtepm {c + 3}; // rtepm等於c + 3的結果
|
||||||
```
|
```
|
||||||
|
|
||||||
## 參考
|
## 參考
|
||||||
|
|||||||
0
02. PARA/03. Resources(資源)/git/submodule.md
Normal file
0
02. PARA/03. Resources(資源)/git/submodule.md
Normal file
Reference in New Issue
Block a user