
"Andy Little" <andy@servocomm.freeserve.co.uk> wrote in message news:edv632$3ku$1@sea.gmane.org...
"Joel de Guzman" <joel@boost-consulting.com> wrote
Indeed. Also, with Fusion, you have the option to use purely constant sequences such as mpl::vector_c together with plain sequences, or even user defined sequences and adapted/converted structs/classes.
Right. I started looking into this scheme for math ops. I opted for a zero and a one, but then I figured that one + one should go to two etc.
In the end I opted for a static_value<StaticValue,RunTimeType>
StaticValue could then be any of mpl::int_ etc, though for mpl int_ division is ( can be) lossy so at that point the division should turn the result into the RunTimeType. other possibilities for StaticValue are a compile time rational, maybe with a long long value_type. At any point where the compile time value will run out of steam then the type will be automatically converted to the RunTimeType.
All in all... how to take a simple idea and make it very very complicated :-)
static_value now implemented, though I changed the param order. runtime and static values should be able to be arbitarily mixed in same tuple. Also tested (after some mods) in the quan::fusion::dot_product functor <quan/fusion/dot_product.hpp> Example: http://tinyurl.com/gq3a4 http://sourceforge.net/projects/quan regards Andy Little