id summary reporter owner description type status milestone component version severity resolution keywords cc 11932 Binary MPL transform on empty fusion sequences does not work zeratul976@… Kohei Takahashi "The following code does not compile with Boost 1.60 in C++11 mode. Tested with recent gcc and clang. {{{ #include #include #include struct predicate { template struct apply { typedef T type; }; }; typedef boost::mpl::transform< boost::fusion::vector<>, boost::fusion::vector<>, predicate> ::type Result; }}} The error is: {{{ In file included from test.cpp:2: In file included from boost/include/boost/fusion/container/vector.hpp:12: In file included from boost/include/boost/fusion/container/vector/vector.hpp:28: In file included from boost/include/boost/fusion/container/vector/detail/at_impl.hpp:12: boost/include/boost/fusion/container/vector/detail/value_at_impl.hpp:50:57: error: no matching function for call to 'value_at_impl' typedef typename mpl::identity(boost::declval()))>::type::type type; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ boost/include/boost/fusion/container/vector/detail/value_of_impl.hpp:30:61: note: in instantiation of template class 'boost::fusion::extension::value_at_impl::apply, mpl_::int_<0>>' requested here typedef typename value_at_impl::template apply::type type; ^ boost/include/boost/fusion/iterator/value_of.hpp:52:15: note: in instantiation of template class 'boost::fusion::extension::value_of_impl::apply, 0>>' requested here : extension::value_of_impl::type>:: ^ boost/include/boost/fusion/iterator/mpl/fusion_iterator.hpp:47:45: note: in instantiation of template class 'boost::fusion::result_of::value_of, 0>>' requested here typedef typename fusion::result_of::value_of::type type; ^ boost/include/boost/mpl/iterator_category.hpp:27:22: note: in instantiation of template class 'boost::mpl::fusion_iterator, 0>>' requested here typedef typename Iterator::category type; ^ boost/include/boost/mpl/pair_view.hpp:152:20: note: in instantiation of template class 'boost::mpl::iterator_category, 0>>>' requested here typename iterator_category::type ^ boost/include/boost/mpl/aux_/has_tag.hpp:20:1: note: in instantiation of template class 'boost::mpl::pair_view, boost::fusion::vector<>>' requested here BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) ^ boost/include/boost/mpl/has_xxx.hpp:245:65: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' , boost::mpl::aux::type_wrapper* = 0 \ ^ boost/include/boost/mpl/aux_/has_tag.hpp:20:1: note: while substituting deduced template arguments into function template 'test' [with U = boost::mpl::pair_view, boost::fusion::vector<>>] BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) ^ boost/include/boost/mpl/has_xxx.hpp:253:18: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' sizeof(gcc_3_2_wknd::test(static_cast(0))) \ ^ boost/include/boost/config/suffix.hpp:394:72: note: expanded from macro 'BOOST_STATIC_CONSTANT' # define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment ^ boost/include/boost/mpl/sequence_tag.hpp:112:30: note: in instantiation of template class 'boost::mpl::aux::has_tag, boost::fusion::vector<>>, mpl_::bool_>' requested here ::boost::mpl::aux::has_tag::value ^ boost/include/boost/mpl/O1_size.hpp:30:30: note: in instantiation of template class 'boost::mpl::sequence_tag, boost::fusion::vector<>>>' requested here : O1_size_impl< typename sequence_tag::type> ^ boost/include/boost/mpl/fold.hpp:34:25: note: in instantiation of template class 'boost::mpl::O1_size, boost::fusion::vector<>>>' requested here ::boost::mpl::O1_size::value ^ boost/include/boost/mpl/transform.hpp:75:7: note: in instantiation of template class 'boost::mpl::fold, boost::fusion::vector<>>, boost::fusion::vector<>, boost::mpl::bind2, mpl_::arg<1>, boost::mpl::bind2, mpl_::arg<2>>, boost::mpl::bind1, mpl_::arg<2>>>>>' requested here : fold< ^ boost/include/boost/mpl/transform.hpp:114:1: note: in instantiation of template class 'boost::mpl::aux::transform2_impl, boost::fusion::vector<>, predicate, boost::mpl::back_inserter>>' requested here BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, transform2) ^ boost/include/boost/mpl/aux_/inserter_algorithm.hpp:52:7: note: expanded from macro 'BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF' : if_< has_push_back< typename clear::type> \ ^ boost/include/boost/mpl/eval_if.hpp:38:22: note: in instantiation of template class 'boost::mpl::transform2, boost::fusion::vector<>, predicate, mpl_::na>' requested here typedef typename f_::type type; ^ boost/include/boost/mpl/transform.hpp:138:1: note: in instantiation of template class 'boost::mpl::eval_if, boost::mpl::is_lambda_expression>, boost::mpl::not_>>, mpl_::bool_, mpl_::bool_>, boost::mpl::transform1, boost::fusion::vector<>, predicate>, boost::mpl::transform2, boost::fusion::vector<>, predicate, mpl_::na>>' requested here AUX778076_TRANSFORM_DEF(transform) ^ boost/include/boost/mpl/transform.hpp:125:22: note: expanded from macro 'AUX778076_TRANSFORM_DEF' typedef typename eval_if< \ ^ test.cpp:13:17: note: in instantiation of template class 'boost::mpl::transform, boost::fusion::vector<>, predicate, mpl_::na>' requested here boost::mpl::transform< ^ boost/include/boost/fusion/container/vector/vector.hpp:275:30: note: candidate template ignored: could not match 'store' against 'vector' mpl::identity value_at_impl(store*); ^ }}} Kohei has indicated on the mailing list [1] that this affects C++11 mode only, and seems to be a regression in 1.60. [1] http://boost.2283326.n4.nabble.com/fusion-mpl-binary-MPL-transform-on-empty-fusion-vectors-tp4682832p4682837.html" Bugs new Boost 1.69 fusion Boost 1.60.0 Problem flast@…