#include #include template struct fib { static constexpr std::size_t value = fib::value + fib::value; }; template<> struct fib<0> { static constexpr std::size_t value = 1; }; template<> struct fib<1> { static constexpr std::size_t value = 1; }; template constexpr std::size_t fib_v = fib::value; template struct print_fib : print_fib { print_fib() noexcept { std::cout << fib_v << '\n'; } }; template<> struct print_fib<0> {}; int main() { print_fib<32>{}; return 0; }