Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | memory
m (Text replace - "{{example cpp" to "{{example")
m (Text replace - "/sidebar" to "/navbar")
Line 1: Line 1:
 
{{cpp/title|uninitialized_copy}}
 
{{cpp/title|uninitialized_copy}}
{{cpp/memory/sidebar}}
+
{{cpp/memory/navbar}}
 
{{ddcl | header=memory | notes={{mark since c++11}} |
 
{{ddcl | header=memory | notes={{mark since c++11}} |
 
template< class InputIterator, class Size, class ForwardIterator >
 
template< class InputIterator, class Size, class ForwardIterator >

Revision as of 13:36, 15 June 2012

 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Dynamic memory management
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Allocators
Garbage collection support
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)



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

ForwardIterator uninitialized_copy_n( InputIterator first, Size count,

                                      ForwardIterator d_first);
(since C++11)

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

Possible implementation

Template:eq fun cpp

Example

See also

Template:cpp/memory/dcl list uninitialized copy