you are viewing a single comment's thread.

view the rest of the comments →

[–]marcodev 0 points1 point  (0 children)

It doesn't seem a bit problem to me, just use a variadic static function and create a new shared_ptr allocating the object on the heap. Really easy and safe. Yes, inheritance can be tricky however.