Boost logo

Boost Users :

Subject: [Boost-users] mpl::transform<...> --- compile error: is not derived from type
From: e r (erwann.rogard_at_[hidden])
Date: 2008-09-06 23:36:42


hi,

here's the problem i have:
    struct my{
      template<typename UInt>
      struct apply{
           typedef mpl::int_<UInt::value> type;
      };
   };

    template<int First,int Last>
    struct id_range{
        typedef mpl::transform<
            mpl::range_c<int,First,Last>
            , my
            , mpl::back_inserter< mpl::vector<> >
>::type type;

/home/er/cpp/boost/random/mcmc/id_range.hpp|32|error: type
‘boost::mpl::transform<boost::mpl::range_c<int, First, Last>,
boost::random::mcmc::<unnamed>::my,
boost::mpl::back_inserter<boost::mpl::vector<mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, mpl_::na>’ is not derived
from type ‘boost::random::mcmc::id_range<First, Last>’|

however, for example, this --instead-- compiles fine:

    struct id_range{
        typedef mpl::transform<
            mpl::range_c<int,1,3>
            , my
            , mpl::back_inserter< mpl::vector<> >
>::type type;
 };
any suggestion appreciated. thanks!


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net