language: C++11 (gcc-4.7.2)
date: 164 days 6 hours ago
link:
visibility: public
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, "");
}