mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 12:44:40 +03:00
revision #1: 第 1 章增加了对 C++17 的支持
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
//
|
||||
// 1.1.cpp
|
||||
//
|
||||
// chapter 1 introduction
|
||||
// c++1x tutorial
|
||||
//
|
||||
// created by changkun at changkun.de
|
||||
//
|
||||
|
||||
#include "foo.h"
|
||||
#include <iostream>
|
||||
#include <functional>
|
||||
|
||||
int main() {
|
||||
add(1, 2);
|
||||
[out = std::ref(std::cout << "Result from C code: " << add(1, 2))](){
|
||||
out.get() << ".\n";
|
||||
}();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user