Vcsn
2.3
Be Rational
|
A simple placeholder for integral constants. More...
#include <name.hh>
Public Attributes | |
symbol | name |
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>".
symbol vcsn::integral_constant::name |
Definition at line 198 of file name.hh.
Referenced by vcsn::vnamer< integral_constant >::name().