Vcsn  2.2a
Be Rational
vcsn::integral_constant Struct Reference

A simple placeholder for integral constants. More...

#include <name.hh>

Collaboration diagram for vcsn::integral_constant:

Public Attributes

symbol name

Detailed Description

A simple placeholder for integral constants.

Consider the case of focus(automaton, tape): it must turn the tape (runtime) argument into a (compile time) parameter.

The compile-time parameter as a value is painful, as it is an exception, it is a nuisance for perfect forwarding which is tailoyred for type parameters (not value parameters), etc. so it is turned into a type parameter thanks to std::integral_constant.

Now the tricky part is therefore going from a runtime integer to a std::integral_constant. This is done by having dyn::focus turn its "unsigned tape" argument into a "integral_constant tape" one, and the latter, when queried by the signature extraction mechanism, must simply say "I'm std::integral_constant<unsigned, tape>".

Definition at line 198 of file name.hh.

Member Data Documentation

symbol vcsn::integral_constant::name

Definition at line 200 of file name.hh.

Referenced by vcsn::vnamer< integral_constant >::name().

The documentation for this struct was generated from the following file: