Hello everybody,
I've a problem with the boost fusion library. I try to convert a fusion
set into a map using the transform algorithm.
Here is a example:
typedef typename boost::fusion::result_of::as_map<
typename boost::fusion::result_of::transform::type
::type Content;
where BoundMembers is a boost::fusion::set and map_name_to_member is
defined as:
struct map_name_to_member
{
template <typename T>
struct result;
template
struct result
{
typedef boost::fusion::pair type;
};
};
With boost 1.56 and gcc 4.8.1 I get the following compilation error:
include/boost/fusion/iterator/key_of.hpp:36:16: error: invalid use of
incomplete type ‘struct
boost::fusion::extension::key_of_implboost::fusion::transform_view_iterator_tag’
struct key_of
^
include/boost/fusion/iterator/key_of.hpp:21:16: error: declaration of
‘struct
boost::fusion::extension::key_of_implboost::fusion::transform_view_iterator_tag’
struct key_of_impl;
However, this code used to work with Boost 1.48. I found a workaround to
fix this, by converting the result of transform to a fusion list before
coverting it to a map, i.e.:
typedef typename boost::fusion::result_of::as_map<
typename boost::fusion::result_of::as_list<
typename boost::fusion::result_of::transform::type
::type
::type Content;
Am I doing something wrong or is this intended behavior? Thanks for your
support.
Best regards,
Christian Kerl