Boost logo

Boost Users :

Subject: Re: [Boost-users] Class generation using inherit_linearly
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-05-15 10:26:25


Peter Nyssen wrote:
> Dear boost users,
>
> I'm clearly missing something w.r.t. mpl_inherit and lamba functions.
> Could someone enlighten me as to why the following code fails to compile?
> The integer template argument in the lambda expression seems to be the
> cause?
>
> //--------------------------
>
> #include <boost/mpl/inherit.hpp>
> #include <boost/mpl/inherit_linearly.hpp>
> #include <boost/mpl/placeholders.hpp>
> #include <boost/mpl/vector.hpp>
>
> using namespace boost;
> using namespace boost::mpl::placeholders;
>
> template <int C, class T>
> struct Wrap {
> T value;
> };
You can't have lambda meta-functions with integral types. Use a wrapped
integer
like boost::mpl::int_ or bosot::mpl::integral_c

-- 
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

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