id summary reporter owner description type status milestone component version severity resolution keywords cc
3204 binary mpl::transform fails to compile with fusion::vector tegtmeye@… Joel de Guzman "Comments from boost-users mailing list:
> Trying the code, it seems mpl::(binary)transform is looking for
> Seq::tag which is not a requirement for MPL::Forward Sequence
> which mpl::transform requires (http://tinyurl.com/l6kcb4).
> fusion::vector adheres fully to an MPL::Forward Sequence.
No, the error is caused by the following code in MPL's pair_view
(which is the underlying implementation mechanism for the binary
transform):
typedef typename min<
typename iterator_category::type
, typename iterator_category::type
>::type category_;
That is, as per iterator_category's requirements [1], pair_view
assumes that the iterator_category's result would be model of
MPL's Integral Constant, which does not seem to be the case with
Fusion categories.
[1]
http://www.boost.org/doc/libs/1_39_0/libs/mpl/doc/refmanual/iterator-categor
y.html
The following code fails to compile:
{{{
#include
#include
#include
#include
#include
using namespace boost;
struct my_make_pair {
template
struct apply {
typedef std::pair type;
};
};
int main(int argc, char *argv[])
{
#if 0
typedef mpl::vector seq1;
typedef mpl::vector seq2;
typedef mpl::vector,std::pair > pairs;
typedef mpl::transform::type result;
BOOST_MPL_ASSERT(( equal ));
#endif
typedef fusion::vector seq1;
typedef fusion::vector seq2;
typedef fusion::vector,std::pair >
pairs;
typedef mpl::transform::type result;
BOOST_MPL_ASSERT(( equal ));
return 0;
}
}}}
" Bugs closed Boost 1.44.0 fusion Boost 1.39.0 Problem fixed