Skip to content

Commit

Permalink
improve some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
suomesta committed Oct 29, 2023
1 parent 51307b0 commit 3f57b63
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Expand Up @@ -21,7 +21,7 @@ struct X {
};

auto y = [=, this] { // C++20から推奨される方法:
return value + g(); // [=]ではthisポインタはキャプチャされなくなるため、thisを指定してキャプチャすること
return value + g(); // [=, this]と別々に指定することで、thisポインタもキャプチャしていることが明示される
};
}

Expand Down
1 change: 1 addition & 0 deletions reference/charconv/from_chars.md
Expand Up @@ -121,6 +121,7 @@ C++標準はこれら関数の実装の詳細について何も規定しない
```cpp example
#include <iostream>
#include <iomanip>
#include <charconv>
int main()
Expand Down
2 changes: 1 addition & 1 deletion reference/type_traits/is_trivially_copyable.md
Expand Up @@ -70,7 +70,7 @@ struct optional {
= default;
// #2
optional(optional const& rhs)
requires copy_constructible<T>;
requires std::copy_constructible<T>;
};
```
* std::is_trivially_copy_constructible_v[link /reference/type_traits/is_trivially_copy_constructible.md]
Expand Down

0 comments on commit 3f57b63

Please sign in to comment.