Added comment about policy incompatibility.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1114 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2011-09-21 23:24:54 +00:00
parent 0801173d25
commit 199f8bcade

View file

@ -400,6 +400,13 @@ namespace Loki
/// ///
/// \ingroup SmartPointerStorageGroup /// \ingroup SmartPointerStorageGroup
/// Implementation of the ArrayStorage used by SmartPtr /// Implementation of the ArrayStorage used by SmartPtr
/// This assumes the pointer points to the zeroth element in an array, and uses
/// the array-delete operator to deconstruct and deallocate the array. DeepCopy
/// is not compatible with ArrayStorage DeepCopy::Clone will only copy the first
/// element in the array and won't know the size of the array. Even if it did
/// know the size, it would need to use array new to safely work the array
/// delete operator in ArrayStorage, but array new will not copy the elements
/// in the source array since it calls the default constructor for each element.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -663,7 +670,12 @@ namespace Loki
/// \ingroup SmartPointerOwnershipGroup /// \ingroup SmartPointerOwnershipGroup
/// Implementation of the OwnershipPolicy used by SmartPtr /// Implementation of the OwnershipPolicy used by SmartPtr
/// Implements deep copy semantics, assumes existence of a Clone() member /// Implements deep copy semantics, assumes existence of a Clone() member
/// function of the pointee type /// function of the pointee type. DeepCopy is not compatible with ArrayStorage
/// DeepCopy::Clone will only copy the first element in the array and won't
/// know the size of the array. Even if it did know the size, it would need to
/// use array new to safely work the array delete operator in ArrayStorage, but
/// array new will not copy the elements in the source array since it calls the
/// default constructor for each array element.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <class P> template <class P>