![]() |
Home | Libraries | People | FAQ | More |
O1SizeSequence
A O1SizeSequence is a Sequence for which the size of the sequence can be queried with O(1) complexity.
size_type
boost::sequence::traits::size_type<S>::type
A type representing the size of the sequence.
index_type
boost::sequence::traits::index_type<S>::type
A type that can act as an index into the sequence. Because size_type may be a wrapper for a compile-time constant, e.g. mpl::integral_c<std::ptrdiff_t, N>, we need a distinct type in order to be able to count at runtime.
| Name | Expression | Type | Semantics |
|---|---|---|---|
Size |
boost::sequence::size(s) |
size_type |
Returns the size of the sequence s. |
Index convertability |
boost::sequence::size(s) |
Convertible to index_type |
Returns the size of the sequence s. |
Index equal-to comparison 1 |
size == index |
Convertible to bool |
Compares an index to a size for equality. |
Index equal-to comparison 2 |
index == size |
Convertible to bool |
Compares an index to a size for equality. |
Index not-equal-to comparison 1 |
size != index |
Convertible to bool |
Compares an index to a size for inequality. |
Index not-equal-to comparison 2 |
index != size |
Convertible to bool |
Compares an index to a size for inequality. |