add comment about auto_ptr

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@492 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2006-01-17 12:03:36 +00:00
parent 8840afc7dd
commit 385f6b06d4

View file

@ -13,7 +13,7 @@
#define LOKI_PIMPL_H #define LOKI_PIMPL_H
#include <loki/TypeTraits.h> #include <loki/TypeTraits.h>
#include <exception>
#ifndef LOKI_INHERITED_PIMPL_NAME #ifndef LOKI_INHERITED_PIMPL_NAME
#define LOKI_INHERITED_PIMPL_NAME d #define LOKI_INHERITED_PIMPL_NAME d
@ -94,6 +94,7 @@ namespace Loki
namespace Private namespace Private
{ {
// does not work with std::auto_ptr
template template
< <
class Impl, class Impl,
@ -120,6 +121,7 @@ namespace Loki
Ptr ptr; Ptr ptr;
}; };
template template
< <
class Impl, class Impl,
@ -143,8 +145,8 @@ namespace Loki
// of the DeclaredRimpl construct // of the DeclaredRimpl construct
if(!init_) if(!init_)
ErrorPolicy<T>::PimplError(); ErrorPolicy<T>::PimplError();
Create(); AutoPtrHolder<Impl,Ptr,Del>::Create();
return *ptr; return *AutoPtrHolder<Impl,Ptr,Del>::ptr;
} }
}; };
@ -350,6 +352,9 @@ namespace Loki
#endif #endif
// $Log$ // $Log$
// Revision 1.9 2006/01/17 12:03:36 syntheticpp
// add comment about auto_ptr
//
// Revision 1.8 2006/01/17 11:07:34 syntheticpp // Revision 1.8 2006/01/17 11:07:34 syntheticpp
// AutoPtrHolderChecked inherits from AutoPtrHolder // AutoPtrHolderChecked inherits from AutoPtrHolder
// //