I have a class with a member that is dynamic allocated (it's allocated only when it will be used).
Think something like that:
class A {};
class B {
A* aMember;
};
what would be better to replace A*: std::optional or std::unique_ptr ?
and when to use std::optional instead std::unique_ptr