diff --git a/ctl/shared_ptr.h b/ctl/shared_ptr.h index ed33a3a98..d3b7396ee 100644 --- a/ctl/shared_ptr.h +++ b/ctl/shared_ptr.h @@ -258,6 +258,9 @@ class shared_ptr { } + template + friend class shared_ptr; + template friend shared_ptr make_shared(Args&&... args); diff --git a/test/ctl/shared_ptr_test.cc b/test/ctl/shared_ptr_test.cc index 46d76504c..a3fc00359 100644 --- a/test/ctl/shared_ptr_test.cc +++ b/test/ctl/shared_ptr_test.cc @@ -62,15 +62,12 @@ main() return 5; } - // TODO(mrdomino): -#if 0 { Ptr x(new int); Ptr y(x, nullptr); if (x.use_count() != 2) return 7; } -#endif { auto x = Mk(5);