#include <boost/fusion/container/list/list.hpp>
#include <boost/fusion/container/list/convert.hpp>
#include <boost/fusion/container/generation/make_list.hpp>
#include <boost/fusion/algorithm/transformation/transform.hpp>
#include <boost/ref.hpp>
using namespace boost;
struct C {};
struct B {
C make_c() { return C(); }
};
struct make_c {
template<typename Sig> struct result;
template <typename T>
struct result<make_c(T&)>
{
typedef C type;
};
template <typename T>
struct result<make_c(T)>
{
typedef C type;
};
template <typename T>
C
operator()(T& t) const { return t.make_c(); }
};
int
main()
{
B b1, b2;
auto z1 = fusion::make_list( ref(b1), ref(b2) );
auto z2 = fusion::as_list( fusion::transform( z1, make_c() ) );
return 0;
}