CAF  0.17.2
Related Functions | List of all members
caf::composed_type< Xs, Ys, Zs, Rs > Struct Template Reference

Computes the type for f*g (actor composition). More...

#include <composed_type.hpp>

Related Functions

(Note that these are not member functions.)

template<class F , class G >
using composed_type_t = typename composed_type< G, F, F, detail::type_list<> >::type
 Convenience type alias.
 

Detailed Description

template<class Xs, class Ys, class Zs, class Rs>
struct caf::composed_type< Xs, Ys, Zs, Rs >

Computes the type for f*g (actor composition).

This metaprogramming function implements the following pseudo-code (with f and g modelled as pairs where the first element is the input type and the second type is the output type).

let composed_type f g =
[(fst x, snd y) | x <- g, y <- f,
snd x == fst y]

This class implements the list comprehension above in a single shot with worst case n*m template instantiations using an inner and outer loop, where n is the size of Xs and m the size of Ys. Zs is a helper that models the "inner loop variable" for generating the cross product of Xs and Ys. Rs collects the results.


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