...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Front Page / Sequences / Concepts / Integral Sequence Wrapper |
An Integral Sequence Wrapper is a class template that provides a concise interface for creating a corresponding sequence of Integral Constants. In particular, assuming that seq is a name of the wrapper's underlying sequence and c_{1},c_{2},... c_{n} 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,c_{1},c_{2},... c_{n}>
If seq is a Variadic Sequence, numbered wrapper forms are also avaialable:
seqn_c<T,c_{1},c_{2},... c_{n}>
In the following table and subsequent specifications, seq is a placeholder token for the Integral Sequence Wrapper's underlying sequence's name.
Expression | Type | Complexity |
---|---|---|
seq_c<T,c_{1},c_{2},... c_{n}> | Forward Sequence | Amortized constant time. |
seq_c<T,c_{1},c_{2},... c_{n}>::type | Forward Sequence | Amortized constant time. |
seq_c<T,c_{1},c_{2},... c_{n}>::value_type | An integral type | Amortized constant time. |
seqn_c<T,c_{1},c_{2},... c_{n}> | Forward Sequence | Amortized constant time. |
seqn_c<T,c_{1},c_{2},... c_{n}>::type | Forward Sequence | Amortized constant time. |
seqn_c<T,c_{1},c_{2},... c_{n}>::value_type | An integral type | Amortized constant time. |
typedef seq_c<T,c_{1},c_{2},... c_{n}> s; typedef seqn_c<T,c_{1},c_{2},... c_{n}> s;
Semantics: | s is a sequence seq of integral constant wrappers integral_c<T,c_{1}>, integral_c<T,c_{2}>, ... integral_c<T,c_{n}>. |
---|---|
Postcondition: | size<s>::value == n. |
typedef seq_c<T,c_{1},c_{2},... c_{n}>::type s; typedef seqn_c<T,c_{1},c_{2},... c_{n}>::type s;
Semantics: | s is identical to seqn<integral_c<T,c_{1}>,integral_c<T,c_{2}>, ... integral_c<T,c_{n}> >. |
---|
typedef seq_c<T,c_{1},c_{2},... c_{n}>::value_type t; typedef seqn_c<T,c_{1},c_{2},... c_{n}>::value_type t;
Semantics: | is_same<t,T>::value == true. |
---|