Description
For NTTP manipulation, it's helpful to use built-in intrinsics for decoding/encoding information (e.g. countbits, firstbitlow, etc.). However, attempt to use these intrinsics in NTTP expressions results in a compiler error.
<source>:13:19: error: non-type template argument of type 'unsigned int' is not an integral constant expression
vector<float, countbits(I)> test;
^~~~~~~~~~~~
<source>:18:12: note: in instantiation of template class 'Foo<3>' requested here
Foo<3> f;
^
Compiler returned: 5
Yeah this is basically lack of constexpr concept, I've come up against this before and had to make boost mpl style template abominations to do a compile time bit count etc.
Description For NTTP manipulation, it's helpful to use built-in intrinsics for decoding/encoding information (e.g.
countbits
,firstbitlow
, etc.). However, attempt to use these intrinsics in NTTP expressions results in a compiler error.Steps to Reproduce Minimal example (CE):
Actual Behavior
Environment