I tried to make the following example.
struct BaseSPtr{};
struct DerivedSPtr : public BaseSPtr{};
class Base{
public:
//virtual shared_ptr<BaseSPtr> function();
virtual BaseSPtr* function();
};
class Derived : public Base
{
public:
//shared_ptr<DerivedSPtr> function() override;
DerivedSPtr* function() override;
};
Can someone tell me if is it possible to make the example with shared_ptr
valid?