I have a class template:
The class is actually much longer.Code:template<typename T1, typename T2> class A { public: void f1(); void f2(); void f3(); int f4(); };
Now, in case the second template parameter is float, f4 should return std::string instead of int.
Is there any way to accomplish this without specifying all of the other parts of the class again?Code:template<typename T1> class A<T1, float> { public: void f1(); void f2(); void f3(); std::string f4(); };
What I'm really trying to do is writing a concatenation_iterator that runs through two iterators in succession. If those iterators are of input iterator category, the postfix ++ operator should return a proxy object, for other categories it should return a copy of itself as is the normal behaviour of postfix ++.



LinkBack URL
About LinkBacks



CornedBee