Skip to content

Instantly share code, notes, and snippets.

View AdhamMagdyA's full-sized avatar
🎯
Focusing

Adham Magdy AdhamMagdyA

🎯
Focusing
View GitHub Profile
@toch
toch / fibonacci.cpp
Created May 9, 2015 14:42
fibonacci template C++
template<int n>
struct fibonacci
{
static constexpr int value = fibonacci<n-1>::value + fibonacci<n-2>::value;
};
template<>
struct fibonacci<0>
{
static constexpr int value = 0;
};