Template overloading?
Is there any way to make this work?
http://coliru.stacked-crooked.com/a/bc2dd06341f614282 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
template<typename, template<typename...> class, typename...>
struct Test
{
};
template<typename, typename...>
struct Test
{
};
template<typename...>
struct SomeTemplate
{
};
int main()
{
Test<int, short, long, float> t1;
Test<int, SomeTemplate, double, bool> t2;
}
|
Last edited on
1 2 3 4 5 6 7 8 9 10 11
|
template < typename, typename... > struct test {} ;
template < typename A, template<typename...> class B, typename... C > struct test< A, B<C...> > {} ;
template <typename...> struct some_template {} ;
int main()
{
test< int, short, long, float > t1;
test< int, some_template<double,bool> > t2;
}
|
Thanks, I forgot I could do that!
Topic archived. No new replies allowed.