Difference between revisions of "cpp/memory/raw storage iterator"
(+) |
m (desc tweaks) |
||
Line 10: | Line 10: | ||
{{ddcl list end}} | {{ddcl list end}} | ||
− | The output iterator {{tt|std::raw_storage_iterator}} makes it possible for standard algorithms to store results in uninitialized memory. Whenever the algorithm writes an object of type {{tt|T}} to the dereferenced iterator, the object is copy-constructed in the | + | The output iterator {{tt|std::raw_storage_iterator}} makes it possible for standard algorithms to store results in uninitialized memory. Whenever the algorithm writes an object of type {{tt|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 {{tt|OutputIterator}} is any type that satisfied output iterator requirements and has {{cpp|operator*}} defined to return an object, for which {{cpp|operator&}} returns an object of type {{tt|T*}}. Usually, the type {{tt|T*}} is used as {{tt|OutputIterator}}. |
===Member functions=== | ===Member functions=== |
Revision as of 12:44, 1 November 2011
Template:cpp/memory/allocator/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td><memory>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td class="t-dcl-nopad">class raw_storage_iterator
<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) | |
advances the iterator and returns the old value of the iterator (public member function) |
This section is incomplete Reason: inherited from std::iterator |