31 virtual int id()
const {
return 1; }
38 virtual int id()
const {
return 2; }
54 assert((*p).id() == 1);
61 assert(p.get()->id() == 1);
68 assert((*p).id() == 2);
93 assert(
a <
b ||
b <
a);
94 assert(!(
a <
b &&
b <
a));
97template<
class T,
class U >
104template<
class T,
class U >
107 assert(
a <
b ||
b <
a);
108 assert(!(
a <
b &&
b <
a));
111template<
class T,
class U >
118template<
class T,
class U >
129 assert(p.
get() == 0);
138 assert(p?
true:
false);
139 assert(p.
get() != 0);
202 throw "shared_ptr<X> sp1(wp1) failed to throw";
256 assert(b1 == (wp1 < wp5));
257 assert(b2 == (wp5 < wp1));
shared_ptr< P > lock() const
shared_ptr< P > dynamic_pointer_cast(shared_ptr< P2 > const &)
shared_ptr< P > static_pointer_cast(shared_ptr< P2 > const &)
void test_eq(T const &a, T const &b)
void test_is_nonzero(shared_ptr< T > const &p)
void test_shared(weak_ptr< T > const &a, weak_ptr< U > const &b)
void test_is_X(shared_ptr< T > const &p)
void test_eq2(T const &a, U const &b)
void release_object(int *p)
void test_nonshared(weak_ptr< T > const &a, weak_ptr< U > const &b)
void test_is_Y(shared_ptr< T > const &p)
void test_ne(T const &a, T const &b)
void test_ne2(T const &a, U const &b)
void test_is_zero(shared_ptr< T > const &p)