description | title | ms.date | ms.topic | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|---|
Learn more about: Platform::Collections::BackInsertIterator Class |
Platform::Collections::BackInsertIterator Class |
03/27/2019 |
reference |
|
|
aecee1ff-100d-4129-b84b-1966f0923dbf |
Represents an iterator that inserts, rather than overwrites, elements into the back end of a sequential collection.
template <typename T>
class BackInsertIterator :
public ::std::iterator<::std::output_iterator_tag, void, void, void, void>;
T
The type of item in the current collection.
The BackInsertIterator class implements the rules required by the back_insert_iterator Class.
Name | Description |
---|---|
BackInsertIterator::BackInsertIterator | Initializes a new instance of the BackInsertIterator class. |
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. |
BackInsertIterator
Header: collection.h
Namespace: Platform::Collections
Initializes a new instance of the BackInsertIterator
class.
explicit BackInsertIterator(
Windows::Foundation::Collections::IVector<T>^ v);
v
An IVector<T> object.
A BackInsertIterator
inserts elements after the last element of the object specified by parameter v
.
Appends the specified object to the end of the current sequential collection.
BackInsertIterator& operator=( const T& t);
t
The object to append to the current collection.
A reference to the current BackInsertIterator.
Retrieves a reference to the current BackInsertIterator.
BackInsertIterator& operator*();
A reference to the current BackInsertIterator.
This operator returns a reference to the current BackInsertIterator; not to any element in the current collection.
Returns a reference to the current BackInsertIterator. The iterator is unmodified.
BackInsertIterator& operator++();
BackInsertIterator operator++(int);
A reference to the current BackInsertIterator.
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*.