Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <memory>
- #include <vector>
- template <int N>
- struct Fib {
- static int const value = Fib<N - 1>::value + Fib<N - 2>::value;
- };
- template <>
- struct Fib<0> {
- static int const value = 1;
- };
- template <>
- struct Fib<1> {
- static int const value = 1;
- };
- template <int>
- struct TD;
- int main() {
- TD<Fib<10>::value> t;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement