In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/nested_exception.h:40,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from prog.cpp:1:
/usr/include/c++/6/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = (0u != 0u); _Tp = int]’:
prog.cpp:7:61: recursively required from ‘constexpr std::enable_if_t<true, int> log2<4u>’
prog.cpp:7:61: required from ‘constexpr std::enable_if_t<true, int> log2<8u>’
prog.cpp:10:11: required from here
/usr/include/c++/6/type_traits:2523:61: error: no type named ‘type’ in ‘struct std::enable_if<false, int>’
using enable_if_t = typename enable_if<_Cond, _Tp>::type;
^
prog.cpp: In function ‘int main()’:
prog.cpp:10:19: error: size of array ‘foo’ is not an integral constant-expression
int foo[log2<8U>];
^