Theoretically, would it be possible to allow multiple C++ templates to have the same name? -
this question has answer here:
it function overloading. e.g. ok this:
void foo(int i) { ; } // function overload ftw. void foo(int i, int j) { ; }
but not (yet) ok this:
template<typename t> class foo { }; // fail! template<typename t1, typename t2> class foo { };
does feature not exist in order avoid confusion? or there reason wouldn't make sense?
no not possible in c++ that.
the template looked first, parameters make impossible know template which.
it seem duplicate one: why not possible overload class templates?
Comments
Post a Comment