Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
faithandbrave committed Dec 21, 2024
1 parent d67d018 commit 8def0da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lang/cpp26/nice_placeholder_with_no_name.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ std::mutex mux;
std::tuple<T, U, V> f();

void f() {
std::lock_gaurd guard{mux}; // デストラクタでの自動解放だけしたいのでguard変数はとくに使わない
std::lock_guard guard{mux}; // デストラクタでの自動解放だけしたいのでguard変数はとくに使わない
auto [a, b, no_use] = f(); // 構造化束縛した一部の変数は使わない
}
```
Expand All @@ -33,7 +33,7 @@ std::mutex mux;
std::tuple<T, U, V> f();

void f() {
std::lock_gaurd _{mux}; // OK
std::lock_guard _{mux}; // OK
auto [a, b, _] = f(); // OK
}
```
Expand Down

0 comments on commit 8def0da

Please sign in to comment.