riccibruno added a comment. To define the masks as `constexpr` variables you will have to make at least `bitPosToMask`, `operator|`, `operator&` and `operator~`. Unfortunately `constexpr` functions in c++11 are rather restricted. It seems to me however that you could do the following:
1. Wait until we can use C++14 in llvm (soon hopefully) to mark the masks `contexpr` (and leave a FIXME for now). 2. Solve the odr-violation issue by using one of the work-around in n4424. In particular I like the second work-around consisting of putting the static members in a class template. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57914/new/ https://reviews.llvm.org/D57914 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits