共用方式為


CElementTraitsBase::RelocateElements

Call this method to relocate elements stored in a collection class object.

static void RelocateElements( 
   T* pDest, 
   T* pSrc, 
   size_t nElements  
);

Parameters

  • pDest
    Pointer to the first element that will receive the relocated data.

  • pSrc
    Pointer to the first element to relocate.

  • nElements
    The number of elements to relocate.

Remarks

This method calls memmove, which is sufficient for most data types. If the objects being moved contain pointers to their own members, this method will need to be overridden.

Requirements

Header: atlcoll.h

See Also

Reference

CElementTraitsBase Class

CElementTraitsBase::CopyElements