其中有一個函數調用了std::copy,本來想自己實現這個copy函數的,不過為了能先用上這些內存輔助函數來實現我的容器類和算法,只好過一段時間來實現一個自己的高效的實現copy函數
_STL_UNINITIALIZED_H_ #include #include #include template< InputIterator, ForwardIterator, T> ForwardIterator result, T* template< InputIterator, ForwardIterator> template< InputIterator, ForwardIterator> template< InputIterator, ForwardIterator> template<> inline *uninitialized_copy( *first, *last, * memmove(result, first, last - result + (last - template<> inline *uninitialized_copy( *first, *last, * memmove(result, first, last - result + (last - template<> inline wchar_t *uninitialized_copy( wchar_t *first, wchar_t *last, wchar_t * memmove(result, first, (last - first) * result + (last - template<> inline wchar_t *uninitialized_copy(wchar_t *first, wchar_t *last, wchar_t * memmove(result, first, (last - first) * result + (last - template< InputIterator, ForwardIterator, T> ForwardIterator result, T* typedef typename _type_traits<T> template< InputIterator, ForwardIterator> std::copy(first, last, result); template< InputIterator, ForwardIterator> ForwardIterator cur = (; first != last; ++first, ++ construct(&*cur, * template< ForwardIterator, T, T1> _uninitialized_fill(ForwardIterator first, ForwardIterator last, T& x, T1* template< ForwardIterator, T> T& template< ForwardIterator, T> T& template< ForwardIterator, T> uninitialized_fill(ForwardIterator first, ForwardIterator last, T& template< ForwardIterator, T, T1> _uninitialized_fill(ForwardIterator first, ForwardIterator last, T& x, T1* typedef typename _type_traits<T1> template< ForwardIterator, T> T& template< ForwardIterator, T> T& ForwardIterator cur = (; cur != last; ++ construct(&* template< ForwardIterator, Size, T, T1> Size n, T& x, T1* template< ForwardIterator, Size, T> Size n, T& template< ForwardIterator, Size, T> Size n, T& template< ForwardIterator, Size, T> Size n, T& template< ForwardIterator, Size, T, T1> Size n, T& x, T1* typedef typename _type_traits<T1> template< ForwardIterator, Size, T> Size n, T& template< ForwardIterator, Size, T> Size n, T& ForwardIterator cur = (; n > ; --n, ++ construct(&*