is it possible to make_unique an abstract class ?
i.e
1 2
//A is an abstract class
std::unique_ptr a = std::make_unique< A >( A );
note :
What I am trying to do is make a class group of SFML's drawables...this is the problem that I am facing thus far, because sf::Drawable is an abstract class...I have seen other person using reference_wrapper...but I don't want to use that technique as that makes my class share the drawable with other object, rather than owning it completely
Yeah, I get the part where unique_ptr can be used with abstract class because polymorphism...
also I decided to just use the other person's implementation which uses ref wrapper...And I succeeded with what I am trying to do...
I wonder if there is any work around though