
what if I want to make it as a composition class? by example /***************example**********/ #include "Type.h" #include "CValue.h" template<typename T> class DIP //digital image processing { public: DIP(); virtual ~DIP(); shared_ptr < Type<T, filter> >createMediumFilter(); }; template<typename T> DIP<T>::DIP() {} template<typename T> DIP<T>::~DIP() {} template<typename T> shared_ptr< Type<T, filter> > DIP<T>::createMediumFilter() { typename Type<T, filter>::pValue c(new mediumFilter< T >); return c; } /*****************end**************/ I want to create the instance of mediumFilter like this in the main function int main() { Type<matrix<double>, Composition>::pValue C(new Composition<matrix<double>
); Type<matrix<double>, CValue>::pValue D; D = C->createCValue();
cout<<"system pause"<<endl; cin.get(); } how could I fix the problems? thanks -- View this message in context: http://old.nabble.com/Help-with-shared_ptr-and-template-tp21699259p29676966.... Sent from the Boost - Users mailing list archive at Nabble.com.