Platform::Collections::BackInsertIterator Class
Represents an iterator that inserts, rather than overwrites, elements into the back end of a sequential collection.
Syntax
template <typename T>
class BackInsertIterator :
public ::std::iterator<::std::output_iterator_tag, void, void, void, void>;
Parameters
T
The type of item in the current collection.
Remarks
The BackInsertIterator class implements the rules required by the back_insert_iterator Class.
Members
Public Constructors
Name | Description |
---|---|
BackInsertIterator::BackInsertIterator | Initializes a new instance of the BackInsertIterator class. |
Public Operators
Name | Description |
---|---|
BackInsertIterator::operator* Operator | Retrieves a reference to the current BackInsertIterator. |
BackInsertIterator::operator++ Operator | Returns a reference to the current BackInsertIterator. The iterator is unmodified. |
BackInsertIterator::operator= Operator | Appends the specified object to the end of the current sequential collection. |
Inheritance Hierarchy
BackInsertIterator
Requirements
Header: collection.h
Namespace: Platform::Collections
BackInsertIterator::BackInsertIterator Constructor
Initializes a new instance of the BackInsertIterator
class.
Syntax
explicit BackInsertIterator(
Windows::Foundation::Collections::IVector<T>^ v);
Parameters
v
An IVector<T> object.
Remarks
A BackInsertIterator
inserts elements after the last element of the object specified by parameter v
.
BackInsertIterator::operator= Operator
Appends the specified object to the end of the current sequential collection.
Syntax
BackInsertIterator& operator=( const T& t);
Parameters
t
The object to append to the current collection.
Return Value
A reference to the current BackInsertIterator.
BackInsertIterator::operator* Operator
Retrieves a reference to the current BackInsertIterator.
Syntax
BackInsertIterator& operator*();
Return Value
A reference to the current BackInsertIterator.
Remarks
This operator returns a reference to the current BackInsertIterator; not to any element in the current collection.
BackInsertIterator::operator++ Operator
Returns a reference to the current BackInsertIterator. The iterator is unmodified.
Syntax
BackInsertIterator& operator++();
BackInsertIterator operator++(int);
Return Value
A reference to the current BackInsertIterator.
Remarks
By design, the first syntax example pre-increments the current BackInsertIterator, and the second syntax post-increments the current BackInsertIterator. The int
type in the second syntax indicates a post-increment operation, not an actual integer operand.
However, this operator does not actually modify the BackInsertIterator. Instead, this operator returns a reference to the unmodified, current iterator. This is the same behavior as operator*.