16 #include "CLHEP/Utility/noncopyable.h"
17 #include "CLHEP/Utility/memory.h"
22 using namespace CLHEP;
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));
97 template<
class T,
class U >
104 template<
class T,
class U >
107 assert(a < b || b < a);
108 assert(!(a < b && b < a));
111 template<
class T,
class U >
118 template<
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";
212 assert(wp2.use_count() == 1);
239 assert(wp1.use_count() == 1);
249 assert(wp1.use_count() == 0);
250 assert(wp2.use_count() == 0);
256 assert(b1 == (wp1 < wp5));
257 assert(b2 == (wp5 < wp1));
shared_ptr< P > dynamic_pointer_cast(shared_ptr< P2 > const &)
void test_nonshared(weak_ptr< T > const &a, weak_ptr< U > const &b)
void test_eq(T const &a, T const &b)
void test_ne2(T const &a, U const &b)
void test_is_X(shared_ptr< T > const &p)
void test_ne(T const &a, T const &b)
void test_is_zero(shared_ptr< T > const &p)
void release_object(int *p)
shared_ptr< P > lock() const
void test_eq2(T const &a, U const &b)
void test_is_nonzero(shared_ptr< T > const &p)
shared_ptr< P > static_pointer_cast(shared_ptr< P2 > const &)
void test_is_Y(shared_ptr< T > const &p)
void test_shared(weak_ptr< T > const &a, weak_ptr< U > const &b)