std::unique_ptr<A> a(new A());
If class A inherit from Singleton class
and then I access with a->getSingleton().member();
it can be a problem?
I mean, unique_ptr and singleton can conflict or is regular?
If I have a singleton class and then i do
class A : public Singleton<A>
The purpose of a singleton is that there is only one instance. An instance of a derived class is also an instance of the singleton. Why is the derived class not the singleton class?
It's the singleton class but I thought it can have problems with unique_ptr
Your problem is with "inherit from singleton", not with unique_ptr
> If class A inherit from Singleton class .. it can be a problem?
Normally no. Which singleton class are you inheriting from?