Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <memory>
- #include <vector>
- constexpr int Fib(int n) {
- int a = 1;
- int b = 1;
- for (int i = 0; i < n; ++i) {
- int t = a + b;
- a = b;
- b = t;
- }
- return b;
- }
- template <class>
- struct TD;
- int main() {
- std::array<int, Fib(10)> a;
- TD<decltype(a)> t;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement