mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 12:44:40 +03:00
revision: #2: 增加随书代码说明
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <functional>
|
||||
|
||||
int main() {
|
||||
// 使用 lambda 表达式
|
||||
[out = std::ref(std::cout << "Result from C code: " << add(1, 2))](){
|
||||
out.get() << ".\n";
|
||||
}();
|
||||
|
||||
Reference in New Issue
Block a user