Beipiel: Variablen-Templates

variable_template.cpp
#include <iostream>
 
template <int N> auto fib    = fib<N-1> + fib<N-2>;
template <>      auto fib<0> = 1ULL;
template <>      auto fib<1> = fib<0>;
 
int main()
{
  std::cout << fib<10> << '\n';
}