From ca71b9b4b5eb7da663a053ff41ed7b4ca0cb9e1e Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Mon, 13 Jun 2022 19:14:15 +0800 Subject: [PATCH] vault backup: 2022-06-13 19:14:15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Affected files: .obsidian/workspace 02. PARA/03. Resources(資源)/C++17/lambda.md --- .obsidian/workspace | 6 +++--- 02. PARA/03. Resources(資源)/C++17/lambda.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.obsidian/workspace b/.obsidian/workspace index 0f0f47b..73ef416 100644 --- a/.obsidian/workspace +++ b/.obsidian/workspace @@ -117,14 +117,14 @@ "active": "cfe19fa2de06a1e6", "lastOpenFiles": [ "02. PARA/03. Resources(資源)/C++17/lambda.md", + "02. PARA/03. Resources(資源)/C++17/以值擷取(captured-by-value).md", + "02. PARA/03. Resources(資源)/C++17/以值擷取(captured.md", "00. TOP/01. TODO.md", "02. PARA/01. Project(專案)/未命名.md", "02. PARA/01. Project(專案)/008. Sentinel.md", "02. PARA/03. Resources(資源)/99. templates/front matter.md", "02. PARA/03. Resources(資源)/Obsidian.md", "attachments/Pasted image 20201206094618.png", - "attachments/para_example.png", - "attachments/Dicker Max_001.jpg", - "attachments/92709501_101757388184474_261941160505769984_o.jpg" + "attachments/para_example.png" ] } \ No newline at end of file diff --git a/02. PARA/03. Resources(資源)/C++17/lambda.md b/02. PARA/03. Resources(資源)/C++17/lambda.md index 17dbc35..d64cefa 100644 --- a/02. PARA/03. Resources(資源)/C++17/lambda.md +++ b/02. PARA/03. Resources(資源)/C++17/lambda.md @@ -202,7 +202,7 @@ auto findInRange = [&, numlist](int32_t start, int32_t end) { 反之,如果已經使用了 `&`,就不可以再參考擷取其他變數,像是 `[&, &var1]` 就是不合法的。 ### 存取 class -Lamdba 寫在 class 裡面的時候,不論「以值擷取」或是「以參考擷取」都沒辦法傳遞成員變數(member variable),只能傳遞 `this`,透過 `this` 來存取成員變數。例: +Lamdba 寫在 class 裡面的時候,不論「以值擷取 」或是「以參考擷取」都沒辦法傳遞成員變數(member variable),只能傳遞 `this`,透過 `this` 來存取成員變數。例: ```cpp class BigBuffer { public: