<<<<<<< .working ======= >>>>>>> .merge-right.r57125
Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Random Access Sequence <<<<<<< .working

Description
=======
Description
>>>>>>> .merge-right.r57125

A Random Access Sequence is a Bidirectional Sequence whose iterators model Random Access Iterator. It guarantees constant time access to arbitrary sequence elements.

<<<<<<< .working
Refinement =======
Refinement >>>>>>> .merge-right.r57125 of

Bidirectional Sequence

Notation

s

A Random Access Sequence

S

A Random Access Sequence type

N

An MPL Integral Constant

o

An arbitrary object

e

A Sequence element

<<<<<<< .working
Valid =======
Valid >>>>>>> .merge-right.r57125 Expressions

In addition to the requirements defined in Bidirectional Sequence, for any Random Access Sequence the following must be met:

Expression

Return type

Type Requirements

Runtime Complexity

begin(s)

Random Access Iterator

Constant

end(s)

Random Access Iterator

Constant

at<N>(s)

Any type

Constant

at<N>(s) = o

Any type

s is mutable and e = o, where e is the first element in the sequence, is a valid expression.

Constant

<<<<<<< .working
Result =======
Result >>>>>>> .merge-right.r57125 Type Expressions

Expression

Compile Time Complexity

result_of::begin<S>::type

Amortized constant time

result_of::end<S>::type

Amortized constant time

result_of::at<S, N>::type

Amortized constant time

result_of::value_at<S, N>::type

Amortized constant time

Expression ======= result_of::value_at<S, N>.

Expression >>>>>>> .merge-right.r57125 Semantics

The semantics of an expression are defined only where they differ from, or are not defined in Bidirectional Sequence.

Expression

Semantics

at<N>(s)

The Nth element from the beginning of the sequence; see at.

<<<<<<< .working
Models

PrevUpHomeNext