KASKADE 7 development version
Some Remarks on Boost Fusion

The boost fusion library supports the use of heterogenous containers or views implementing sequence concepts and algorithms , working on them. In Kaskade these containers, in particular boost::fusion::vector is used to define a VariableSet, which consists of variables of varying types.

There are two types of "functions" avaliable in boost::fusion:

  • proper functions: they work on data, placed inside the containers
  • metafunctions: they work on the types of the data

Usually each function is accompanied by a metafunction, which returns the return type of the function. To be able to store the output of functions, one has to use metafunctions to determine the storage type.

Example: a function f that operates on a container v of type V and generates a container t of type T

typedef T result_of::f<Arg,V>::type
T t = f<Arg>(v)

Some often used functions