Changes
Page history
Update cpp
authored
Aug 13, 2024
by
umaumax
Show whitespace changes
Inline
Side-by-side
cpp.md
View page @
2ebb19d4
...
...
@@ -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
)
## 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
*
[
variant - cpprefjp C++日本語リファレンス
](
https://cpprefjp.github.io/reference/variant/variant.html
)
...
...
...
...