std::raw_storage_iterator (3) - Linux Manuals
std::raw_storage_iterator: std::raw_storage_iterator
NAME
std::raw_storage_iterator - std::raw_storage_iterator
Synopsis
Defined in header <memory>
template< class OutputIt, class T >
class raw_storage_iterator (until C++17)
: public std::iterator<std::output_iterator_tag, void, void, void, void>;
template< class OutputIt, class T > (since C++17)
class raw_storage_iterator; (deprecated)
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 OutputIt is any type that meets the requirements of LegacyOutputIterator and has operator* defined to return an object, for which operator& returns an object of type T*. Usually, the type T* is used as OutputIt.
Type requirements
-
OutputIt must meet the requirements of LegacyOutputIterator.
Member functions
constructor (public member function)
operator= (public member function)
operator* (public member function)
operator++ (public member function)
operator++(int)
base provides access to the wrapped iterator
(since C++17)
Member types
Member type Definition
value_type void
difference_type void
pointer void
reference void
iterator_category std::output_iterator_tag
These member types are required to be obtained by inheriting from std::iterator<std::output_iterator_tag, void, void, void, void>. (until C++17)
Example
// Run this code
Output:
See also
allocator_traits provides information about allocator types