This is fun implementation of the Fibonachi function:
template<int N>
constexpr int fibo() {
if constexpr (N >= 2) {
return fibo<N - 1>() + fibo<N - 2>();
} else {
return N;
}
}
This is fun implementation of the Fibonachi function:
template<int N>
constexpr int fibo() {
if constexpr (N >= 2) {
return fibo<N - 1>() + fibo<N - 2>();
} else {
return N;
}
}