.TH "std::front_insert_iterator< _Container >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::front_insert_iterator< _Container > \- Turns assignment into insertion\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBstd::iterator< output_iterator_tag, void, void, void, void >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP _Container \fBcontainer_type\fP" .br .RI "A nested typedef for the type of whatever container you used\&. " .ti -1c .RI "\fBusing\fP \fBdifference_type\fP = ptrdiff_t" .br .ti -1c .RI "\fBtypedef\fP \fBoutput_iterator_tag\fP \fBiterator_category\fP" .br .RI "One of the \fBtag types\fP\&. " .ti -1c .RI "\fBtypedef\fP \fBvoid\fP \fBpointer\fP" .br .RI "This type represents a pointer-to-value_type\&. " .ti -1c .RI "\fBtypedef\fP \fBvoid\fP \fBreference\fP" .br .RI "This type represents a reference-to-value_type\&. " .ti -1c .RI "\fBtypedef\fP \fBvoid\fP \fBvalue_type\fP" .br .RI "The type 'pointed to' by the iterator\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "constexpr \fBfront_insert_iterator\fP (_Container &__x)" .br .RI "The only way to create this iterator is with a container\&. " .ti -1c .RI "constexpr \fBfront_insert_iterator\fP & \fBoperator*\fP ()" .br .RI "Simply returns *this\&. " .ti -1c .RI "constexpr \fBfront_insert_iterator\fP & \fBoperator++\fP ()" .br .RI "Simply returns *this\&. (This iterator does not \fImove\fP\&.) " .ti -1c .RI "constexpr \fBfront_insert_iterator\fP \fBoperator++\fP (int)" .br .RI "Simply returns *this\&. (This iterator does not \fImove\fP\&.) " .ti -1c .RI "constexpr \fBfront_insert_iterator\fP & \fBoperator=\fP (const \fBtypename\fP _Container::value_type &__value)" .br .ti -1c .RI "constexpr \fBfront_insert_iterator\fP & \fBoperator=\fP (\fBtypename\fP _Container::value_type &&__value)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "_Container * \fBcontainer\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _Container> .br class std::front_insert_iterator< _Container >"Turns assignment into insertion\&. These are output iterators, constructed from a container-of-T\&. Assigning a T to the iterator prepends it to the container using push_front\&. .PP Tip: Using the front_inserter function to create these iterators can save typing\&. .SH "Member Typedef Documentation" .PP .SS "template<\fBtypename\fP _Container > \fBtypedef\fP _Container \fBstd::front_insert_iterator\fP< _Container >::container_type" .PP A nested typedef for the type of whatever container you used\&. .SS "\fBtypedef\fP \fBoutput_iterator_tag\fP \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP >::iterator_category\fC [inherited]\fP" .PP One of the \fBtag types\fP\&. .SS "\fBtypedef\fP \fBvoid\fP \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP >::pointer\fC [inherited]\fP" .PP This type represents a pointer-to-value_type\&. .SS "\fBtypedef\fP \fBvoid\fP \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP >::reference\fC [inherited]\fP" .PP This type represents a reference-to-value_type\&. .SS "\fBtypedef\fP \fBvoid\fP \fBstd::iterator\fP< \fBoutput_iterator_tag\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP , \fBvoid\fP >::value_type\fC [inherited]\fP" .PP The type 'pointed to' by the iterator\&. .SH "Constructor & Destructor Documentation" .PP .SS "template<\fBtypename\fP _Container > constexpr \fBstd::front_insert_iterator\fP< _Container >::front_insert_iterator (_Container & __x)\fC [inline]\fP, \fC [explicit]\fP, \fC [constexpr]\fP" .PP The only way to create this iterator is with a container\&. .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP _Container > constexpr \fBfront_insert_iterator\fP & \fBstd::front_insert_iterator\fP< _Container >::operator* ()\fC [inline]\fP, \fC [constexpr]\fP" .PP Simply returns *this\&. .SS "template<\fBtypename\fP _Container > constexpr \fBfront_insert_iterator\fP & \fBstd::front_insert_iterator\fP< _Container >::operator++ ()\fC [inline]\fP, \fC [constexpr]\fP" .PP Simply returns *this\&. (This iterator does not \fImove\fP\&.) .SS "template<\fBtypename\fP _Container > constexpr \fBfront_insert_iterator\fP \fBstd::front_insert_iterator\fP< _Container >::operator++ (int)\fC [inline]\fP, \fC [constexpr]\fP" .PP Simply returns *this\&. (This iterator does not \fImove\fP\&.) .SS "template<\fBtypename\fP _Container > constexpr \fBfront_insert_iterator\fP & \fBstd::front_insert_iterator\fP< _Container >::operator= (const \fBtypename\fP _Container::value_type & __value)\fC [inline]\fP, \fC [constexpr]\fP" .PP \fBParameters\fP .RS 4 \fI__value\fP An instance of whatever type container_type::const_reference is; presumably a reference-to-const T for container\&. .RE .PP \fBReturns\fP .RS 4 This iterator, for chained operations\&. .RE .PP This kind of iterator doesn't really have a \fIposition\fP in the container (you can think of the position as being permanently at the front, if you like)\&. Assigning a value to the iterator will always prepend the value to the front of the container\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.