So I try:
class data_ppp {
public:
template <class T>
virtual boost::shared_ptr<T> getData()
{
return boost::shared_ptr<T>(new T());
}
};
class data_child : public data_ppp {
public:
template<>
getData<std::vector<int>>();
};
but cant get desired effect – I want to have in class data_child getData function that would only return boost::shared_ptr<std::vector<int>>. How to do such thing?
The only solution to your problem that I see now is:
Usage: