Created
October 30, 2021 21:13
-
-
Save UplinkCoder/55a27c607ec1c2fb34ee0e0514ff52fc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| static assert(Foo.tupleof.length == 1); | |
| struct Foo { | |
| int a; | |
| static if(Foo.tupleof.length == 1) { | |
| int b; | |
| static assert(Foo.tupleof.length == 3); // ok | |
| } | |
| static if(Foo.tupleof.length == 1) { | |
| int c; | |
| } | |
| static assert(Foo.tupleof.length == 3); // ok | |
| static if(Foo.tupleof.length == 3) { | |
| int d; | |
| static assert(0); // never run | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment