Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/mpl/doc/src/refmanual/IntegralSequenceWrapper.rst @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 3.6 KB

Integral Sequence Wrapper

Description

An |Integral Sequence Wrapper| is a class template that provides a concise interface for creating a corresponding sequence of |Integral Constant|s. In particular, assuming that seq is a name of the wrapper's underlying sequence and |c1...cn| are integral constants of an integral type T to be stored in the sequence, the wrapper provides us with the following notation:

seq_c<T,|c1...cn|>

If seq is a |Variadic Sequence|, numbered wrapper forms are also avaialable:

seqn_c<T,|c1...cn|>

Expression requirements

|In the following table...| seq is a placeholder token for the |Integral Sequence Wrapper|'s underlying sequence's name.

Expression Type Complexity
seq_c<T,|c1...cn|> |Forward Sequence| Amortized constant time.
seq_c<T,|c1...cn|>::type |Forward Sequence| Amortized constant time.
seq_c<T,|c1...cn|>::value_type An integral type Amortized constant time.
seqn_c<T,|c1...cn|> |Forward Sequence| Amortized constant time.
seqn_c<T,|c1...cn|>::type |Forward Sequence| Amortized constant time.
seqn_c<T,|c1...cn|>::value_type An integral type Amortized constant time.

Expression semantics

typedef seq_c<T,|c1...cn|> s;
typedef seqn_c<T,|c1...cn|> s;
Semantics:s is a sequence seq of integral constant wrappers integral_c<T,|c1|>, integral_c<T,|c2|>, ... integral_c<T,|cn|>.
Postcondition:size<s>::value == n.
typedef seq_c<T,|c1...cn|>::type s;
typedef seqn_c<T,|c1...cn|>::type s;
Semantics:s is identical to seqn<integral_c<T,|c1|>,integral_c<T,|c2|>, ... integral_c<T,|cn|> >.
typedef seq_c<T,|c1...cn|>::value_type t;
typedef seqn_c<T,|c1...cn|>::value_type t;
Semantics:is_same<t,T>::value == true.

Docutils System Messages

????????????????????????????????
Note: See TracBrowser for help on using the repository browser.