Namespaces
Variants
Views
Actions

std::raw_storage_iterator

From cppreference.com
< cpp‎ | memory
Revision as of 09:22, 8 December 2011 by P12 (Talk | contribs)

Template:cpp/memory/allocator/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <memory>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
template< class OutputIterator, class T >

class raw_storage_iterator

    : public std::iterator<std::output_iterator_tag, void, void, void, void>;
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

The output iterator std::raw_storage_iterator makes it possible for standard algorithms to store results in uninitialized memory. Whenever the algorithm writes an object of type T to the dereferenced iterator, the object is copy-constructed into the location in the uninitialized storage pointed to by the iterator. The template parameter OutputIterator is any type that satisfied output iterator requirements and has Template:cpp defined to return an object, for which Template:cpp returns an object of type T*. Usually, the type T* is used as OutputIterator.

Member functions

creates a new raw_storage_iterator
(public member function)
returns a reference to this raw_storage_iterator
(public member function)
copy-constructs an object at the pointed-to location in the buffer
(public member function)
advances the iterator and returns a reference to the updated iterator
(public member function)
[[ cpp/memory/raw_storage_iterator/operator++(int) | span>]]
#MAGICTITLESTRING#}})

Example

Template:example cpp

See also

Template:cpp/memory/dcl list allocator traitsTemplate:cpp/memory/dcl list scoped allocator adaptorTemplate:cpp/memory/dcl list uses allocator