The PtrTraits class is used everywhere in ThePEG to interface to the pointers which are handled. More...
#include <PtrTraits.h>
The PtrTraits class is used everywhere in ThePEG to interface to the pointers which are handled.
In particular, ThePEG never uses new or delete but always PtrTraits<P>::create and PtrTraits<P>::destroy (to be precise the destroy method is never used since all pointers are assumed to be reference counted or in another way garbage collected). Also ThePEG always uses dynamic_ptr_cast (rather than the standard dynamic_cast) which in turn calls the PtrTraits<P>::DynamicCast.
In this file is also defined the specialized std::iterator_traits for the reference counted pointers.
Definition at line 39 of file PtrTraits.h.