Skip to content
Update cpp authored by umaumax's avatar umaumax
...@@ -51,6 +51,20 @@ e.g. `void Foo(const string &in, string *out);` ...@@ -51,6 +51,20 @@ e.g. `void Foo(const string &in, string *out);`
[syntax - Why do people use \_\_ (double underscore) so much in C++ - Stack Overflow](https://stackoverflow.com/questions/224397/why-do-people-use-double-underscore-so-much-in-c) [syntax - Why do people use \_\_ (double underscore) so much in C++ - Stack Overflow](https://stackoverflow.com/questions/224397/why-do-people-use-double-underscore-so-much-in-c)
## C++11
### 通常の関数もラムダ関数のように返り値の肩を後ろに記述できる
`💡` [戻り値の型を後置する関数宣言構文 \[N2541\] - cpprefjp C++日本語リファレンス](https://cpprefjp.github.io/lang/cpp11/trailing_return_types.html)
```cpp
auto Add(int a, int b) -> int {
return a + b;
}
```
関数名のインデントは揃えやすくなる
## C++17 ## C++17
* [variant - cpprefjp C++日本語リファレンス](https://cpprefjp.github.io/reference/variant/variant.html) * [variant - cpprefjp C++日本語リファレンス](https://cpprefjp.github.io/reference/variant/variant.html)
... ...
......