参考: stackoverflow 初见make_shared & shared_ptr,感到非常的疑惑。为何?首先,观察以下代码 12345678910111213 struct { static int a = 1};void test(){ auto ptr_1 = std::shared_ptr(ts); auto ptr_2 = std::make_shared(ts); std::cout << }int main(){ test();} 赞微海报分享
近期评论