-
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #693 from andreasfertig/p0609
Added support for P0609: Attributes for Structured Bindings.
- Loading branch information
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// cmdline:-std=c++26 | ||
|
||
auto g() { | ||
int ar[]{2,3,4}; | ||
auto [a, b [[maybe_unused]], c] = ar; | ||
return a + c; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
int g() | ||
{ | ||
int ar[3] = {2, 3, 4}; | ||
int __ar5[3] = {ar[0], ar[1], ar[2]}; | ||
int & a = __ar5[0]; | ||
[[maybe_unused]] int & b = __ar5[1]; | ||
int & c = __ar5[2]; | ||
return a + c; | ||
} |