Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::integral_constant Struct Reference

A simple placeholder for integral constants. More...

#include <name.hh>

Collaboration diagram for vcsn::integral_constant:

Public Attributes

std::string name
 

Detailed Description

A simple placeholder for integral constants.

Consider the case of blind(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::blind 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 155 of file name.hh.

Member Data Documentation

std::string vcsn::integral_constant::name

Definition at line 157 of file name.hh.

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


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