I want to convert an \"array\" of bool
to a integer sequence.
So I need to compute an std::array
at compile time.
Here is my code
This code looks correct and works when compiled as C++17.
It uses std::array::begin, which only has been made constexpr
in C++17.
A better compilation error can be achieved when using clang, which states:
:23:25: note: non-constexpr function 'begin' cannot be used in a constant expression
auto it = array.begin();