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:
2022-06-08 14:32:41 +08:00
parent 58178415c4
commit 4fba5827bd
4 changed files with 12 additions and 11 deletions

View File

@@ -1,2 +1,3 @@
lvalue 是指:
- 等號左邊的值
- 「有固定address」的變數
- 可以被「取址」的變數

View File

@@ -1,12 +1,12 @@
rvalue 是指:
- 等號右邊的值
- 臨時的值,例如運算的結果
- 無法被取址address-of的物件
# rvalue參考
可以用`&&`來參考rvalue。例如
```
```cpp
int c{5};
int&& rtepm {c + 3};
int&& rtepm {c + 3}; // rtepm等於c + 3的結果
```
## 參考