OFauto_ptr_ref< T > Class Template Reference

internal class, don't ever use this directly! This is needed to make the following code work: More...

List of all members.

Public Member Functions

 OFauto_ptr_ref (T *p)
 constructs a OFauto_ptr_ref from a pointer.

Public Attributes

T * ptr
 the pointer that it's all about


Detailed Description

template<class T>
class OFauto_ptr_ref< T >

internal class, don't ever use this directly! This is needed to make the following code work:

  OFauto_ptr<X> func() { return new X; }
  OFauto_ptr<X> local_var = func();
  

The compiler will add implicit casts to OFauto_ptr_ref to make this work:

  OFauto_ptr<X> func() { return OFauto_ptr_ref<X>(new X); }
  OFauto_ptr<X> local_var = OFstatic_cast(OFauto_ptr_ref<X>, func());
  

Definition at line 58 of file ofaptr.h.


Constructor & Destructor Documentation

template<class T>
OFauto_ptr_ref< T >::OFauto_ptr_ref ( T *  p  )  [inline, explicit]

constructs a OFauto_ptr_ref from a pointer.

Parameters:
p the pointer to use.

Definition at line 67 of file ofaptr.h.


The documentation for this class was generated from the following file:


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1