A type that can hold both Foo* and std::shared_ptr

后端 未结 0 1282
滥情空心
滥情空心 2021-01-12 22:51

What\'s the most convenient way to be able to store either std::shared_ptr or Foo* in the same type?

Foo* a = ...;
std::shared_ptr b = ...;

Bar c          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题