T belongs to the set of value types of X if, for an object t of type T, *x = t; is well-defined and does not require performing any non-trivial conversions on t. [1]

An Output Iterator may be singular, meaning that the results of most operations, including copying and dereference assignment, are undefined. The only operation that is guaranteed to be supported is assigning a nonsingular iterator to a singular iterator.

An Output Iterator may be dereferenceable, meaning that assignment through it is defined. Dereferenceable iterators are always nonsingular, but nonsingular iterators are not necessarily dereferenceable.

Valid expressions
Name Expression Type requirements Return type
Default constructor X x; X()
Copy constructor X(x) X
Copy constructor X y(x); or X y = x;
Dereference assignment *x = t t is convertible to a type in the set of value types of X. [1] Result is not used
Preincrement ++x X&
Postincrement (void) x++ void
Postincrement and assign *x++ = t; Result is not used
Expression semantics
Name Expression Precondition Semantics Postcondition
Default constructor X x; X() x may be singular
Copy constructor X(x) x is nonsingular *X(x) = t is equivalent to *x = t [2]
Copy constructor X x(y); or X x = y; y is nonsingular *y = t is equivalent to *x = t [2]
Dereference assignment *x = t x is dereferenceable. If there has been a previous assignment through x, then there has been an intervening increment. [3]
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату