1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include <iostream> template <int N> struct hoge { hoge<N + 1> next; }; template <> struct hoge<10> { }; template <> struct hoge<3> { static int const N = 3; hoge<N + 1> next; }; int main(void) { return 0; }