Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/memory/uninitialized copy n"

From cppreference.com
< cpp‎ | memory
(Equivalent function: +return value)
(fix)
Line 1: Line 1:
 
{{cpp/title|uninitialized_copy}}
 
{{cpp/title|uninitialized_copy}}
 
{{cpp/memory/sidebar}}
 
{{cpp/memory/sidebar}}
{{ddcl |  
+
{{ddcl | header=memory | notes={{mark c++11 feature}} |
 
template< class InputIterator, class Size, class ForwardIterator >
 
template< class InputIterator, class Size, class ForwardIterator >
 
ForwardIterator uninitialized_copy_n( InputIterator first, Size count,
 
ForwardIterator uninitialized_copy_n( InputIterator first, Size count,

Revision as of 13:11, 12 August 2011

Template:cpp/memory/sidebar

Defined in header <memory>
template< class InputIterator, class Size, class ForwardIterator >

ForwardIterator uninitialized_copy_n( InputIterator first, Size count,

                                      ForwardIterator d_first);
Template:mark c++11 feature

Copies count elements from a range beginning at first to an uninitialized memory area beginning at d_first. The elements in the uninitialized area are constructed using copy constructor.

Contents

Parameters

first - the beginning of the range of the elements to copy
d_first - the beginning of the destination range

Return value

iterator to the element past the last element copied.

Complexity

linear in count

Equivalent function

Template:eq fun cpp

Example

Template:example cpp

See also

Template:cpp/memory/dcl list uninitialized copy