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:
parent
0801173d25
commit
199f8bcade
1 changed files with 13 additions and 1 deletions
|
@ -400,6 +400,13 @@ namespace Loki
|
|||
///
|
||||
/// \ingroup SmartPointerStorageGroup
|
||||
/// 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
|
||||
/// Implementation of the OwnershipPolicy used by SmartPtr
|
||||
/// 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>
|
||||
|
|
Loading…
Reference in a new issue