...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 c1,c2,... 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,c1,c2,... cn>
If seq is a Variadic Sequence, numbered wrapper forms are also avaialable:
seqn_c,c1,c2,... cn>
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 |
Forward Sequence | Amortized constant time. |
seq_c |
Forward Sequence | Amortized constant time. |
seq_c |
An integral type | Amortized constant time. |
seqn_c |
Forward Sequence | Amortized constant time. |
seqn_c |
Forward Sequence | Amortized constant time. |
seqn_c |
An integral type | Amortized constant time. |
typedef seq_cc1,c2,... cn> s; typedef seqn_c c1,c2,... cn> s;
Semantics: | s is a sequence seq of integral constant wrappers integral_c |
---|---|
Postcondition: | size |
typedef seq_cc1,c2,... cn>::type s; typedef seqn_c c1,c2,... cn>::type s;
Semantics: | s is identical to
seqn<integral_c |
---|
typedef seq_cc1,c2,... cn>::value_type t; typedef seqn_c c1,c2,... cn>::value_type t;
Semantics: | is_same |
---|