.TH "std::insert_iterator< _Container >" 3cxx "Sun Feb 7 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::insert_iterator< _Container > \- Turns assignment into insertion\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::iterator< output_iterator_tag, void, void, void, void >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef _Container \fBcontainer_type\fP" .br .RI "A nested typedef for the type of whatever container you used\&. " .ti -1c .RI "typedef void \fBdifference_type\fP" .br .RI "Distance between iterators is represented as this type\&. " .ti -1c .RI "typedef \fBoutput_iterator_tag\fP \fBiterator_category\fP" .br .RI "One of the \fBtag types\fP\&. " .ti -1c .RI "typedef void \fBpointer\fP" .br .RI "This type represents a pointer-to-value_type\&. " .ti -1c .RI "typedef void \fBreference\fP" .br .RI "This type represents a reference-to-value_type\&. " .ti -1c .RI "typedef void \fBvalue_type\fP" .br .RI "The type 'pointed to' by the iterator\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBinsert_iterator\fP (_Container &__x, typename _Container::iterator __i)" .br .ti -1c .RI "\fBinsert_iterator\fP & \fBoperator*\fP ()" .br .RI "Simply returns *this\&. " .ti -1c .RI "\fBinsert_iterator\fP & \fBoperator++\fP ()" .br .RI "Simply returns *this\&. (This iterator does not \fImove\fP\&.) " .ti -1c .RI "\fBinsert_iterator\fP & \fBoperator++\fP (int)" .br .RI "Simply returns *this\&. (This iterator does not \fImove\fP\&.) " .ti -1c .RI "\fBinsert_iterator\fP & \fBoperator=\fP (const typename _Container::value_type &__value)" .br .ti -1c .RI "\fBinsert_iterator\fP & \fBoperator=\fP (typename _Container::value_type &&__value)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "_Container * \fBcontainer\fP" .br .ti -1c .RI "_Container::iterator \fBiter\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class std::insert_iterator< _Container >" Turns assignment into insertion\&. These are output iterators, constructed from a container-of-T\&. Assigning a T to the iterator inserts it in the container at the iterator's position, rather than overwriting the value at that position\&. .PP (Sequences will actually insert a \fIcopy\fP of the value before the iterator's position\&.) .PP Tip: Using the inserter function to create these iterators can save typing\&. .PP Definition at line 665 of file bits/stl_iterator\&.h\&. .SH "Member Typedef Documentation" .PP .SS "typedef void \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , void , void , void , void >::\fBdifference_type\fP\fC [inherited]\fP" .PP Distance between iterators is represented as this type\&. .PP Definition at line 125 of file stl_iterator_base_types\&.h\&. .SS "typedef \fBoutput_iterator_tag\fP \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , void , void , void , void >::\fBiterator_category\fP\fC [inherited]\fP" .PP One of the \fBtag types\fP\&. .PP Definition at line 121 of file stl_iterator_base_types\&.h\&. .SS "typedef void \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , void , void , void , void >::\fBpointer\fP\fC [inherited]\fP" .PP This type represents a pointer-to-value_type\&. .PP Definition at line 127 of file stl_iterator_base_types\&.h\&. .SS "typedef void \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , void , void , void , void >::\fBreference\fP\fC [inherited]\fP" .PP This type represents a reference-to-value_type\&. .PP Definition at line 129 of file stl_iterator_base_types\&.h\&. .SS "typedef void \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , void , void , void , void >::\fBvalue_type\fP\fC [inherited]\fP" .PP The type 'pointed to' by the iterator\&. .PP Definition at line 123 of file stl_iterator_base_types\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.