1 2 3 4 5 6 7 8 9 10 11 12 | namespace flags { constexpr int a=1, b=1<<1, c=1<<2 ; } int main() { auto a=flags::a | flags::b; //These can be compile operations too! static_assert(flags::a | flags::b==3, ""); } |
bmFtZXNwYWNlIGZsYWdzIHsKICAgIGNvbnN0ZXhwciBpbnQgYT0xLAogICAgICAgICAgICAgICAgICBiPTE8PDEsCiAgICAgICAgICAgICAgICAgIGM9MTw8MgogICAgICAgICAgICAgICAgICA7Cn0KCmludCBtYWluKCkgewogICAgYXV0byBhPWZsYWdzOjphIHwgZmxhZ3M6OmI7CiAgICAvL1RoZXNlIGNhbiBiZSBjb21waWxlIG9wZXJhdGlvbnMgdG9vIQogICAgc3RhdGljX2Fzc2VydChmbGFnczo6YSB8IGZsYWdzOjpiPT0zLCAiIik7Cn0=
-
upload with new input
-
result: Success time: 0s memory: 2924 kB returned value: 0


