3 // pointer get() const noexcept;
6 #include <libkern/c++/intrusive_shared_ptr.h>
7 #include "test_policy.h"
8 #include <darwintest.h>
17 can_call_get_on_temporary(int)->decltype(std::declval
<test_shared_ptr
<T
> >().get(), bool ())
24 can_call_get_on_temporary(...)->bool
35 tracking_policy::reset();
36 tracked_shared_ptr
<T
> const ptr(&obj
, libkern::retain
);
39 CHECK(ptr
.get() == raw
); // ptr didn't change
40 CHECK(tracking_policy::retains
== 1);
41 CHECK(tracking_policy::releases
== 0);
44 static_assert(!can_call_get_on_temporary
<T
>(int{}), "");
47 T_DECL(get
, "intrusive_shared_ptr.get") {