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 >createMediumFilter();
};
template<typename T>
DIP<T>::DIP()
{}
template<typename T>
DIP<T>::~DIP()
{}
template<typename T>
shared_ptr< Type > DIP<T>::createMediumFilter()
{
typename Type::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::pValue C(new Composition
);
Type::pValue D;
D = C->createCValue();
cout<<"system pause"<http://old.nabble.com/Help-with-shared_ptr-and-template-tp21699259p29676966....
Sent from the Boost - Users mailing list archive at Nabble.com.