|
| variant () |
| Empty construction. More...
|
|
template<typename T > |
| variant (const T &t) |
| Construct and fill. More...
|
|
| ~variant () |
| Destruction, allowed only if empty. More...
|
|
template<typename T > |
T & | build () |
| Instantiate an empty T in here. More...
|
|
template<typename T > |
T & | build (const T &t) |
| Instantiate a T in here from t. More...
|
|
template<typename T > |
T & | as () |
| Accessor to a built T. More...
|
|
template<typename T > |
const T & | as () const |
| Const accessor to a built T (for printer). More...
|
|
template<typename T > |
void | swap (self_type &other) |
| Swap the content with other, of same type. More...
|
|
template<typename T > |
void | move (self_type &other) |
| Move the content of other to this. More...
|
|
template<typename T > |
void | copy (const self_type &other) |
| Copy the content of other to this. More...
|
|
template<typename T > |
void | destroy () |
| Destroy the stored T. More...
|
|
template<size_t S>
struct vcsn::rat::variant< S >
A char[S] buffer to store and retrieve objects.
Sort of a variant, but does not keep track of the nature of the stored data, since that knowledge is available via the current state.
Definition at line 169 of file parse.hh.
template<size_t S>
template<typename T >
Swap the content with other, of same type.
Both variants must be built beforehand, because swapping the actual data requires reading it (with as()), and this is not possible on unconstructed variants: it would require some dynamic testing, which should not be the variant's responsability. Swapping between built and (possibly) non-built is done with variant::move ().
Definition at line 232 of file parse.hh.