3 template <bool B, class T=void> struct enable_if;
6 struct enable_if<true,T>
12 // it compiles with the previous line commented out and the next commented in
13 // static const int RUNTIME=0;
15 template <class T, class U, class EN=void> struct foo;
17 template <template<int> class V, int M>
18 struct foo<V<M>,V<M>, typename enable_if<M==RUNTIME||M==2>::type> {};
20 template <template<int> class V1, template<int> class V2, int M>
21 struct foo<V1<M>,V2<M>, typename enable_if<M==RUNTIME||M==2>::type> {};
23 template <int M> struct bar {};
25 foo<bar<2>,bar<2> > x;