Boost logo

Boost Users :

Subject: [Boost-users] [mpl] Using max_element inside a fold while constructing a vector
From: Brendon Costa (brendon.j.costa_at_[hidden])
Date: 2013-06-01 17:17:01


I am using:
* gcc 4.5.3 and boost 1.50 : Compiles but produces unexpected result
* MSVC 2010 and boost 1.53 : Doesn't compile

On Sunday, 2 June 2013, Steven Watanabe wrote:

> AMDG
>
> On 05/31/2013 06:35 PM, Brendon Costa wrote:
> >>
> >> try push_back<_1, deref<max_element<_1> > >.
> >> i.e. don't use ::type in an MPL Lambda expression.
> >>
> >>
> >>
> > That doesn't work either. Below is a full code example as I think it
> should
> > be from your feedback (I have tried in GCC and MSVC2010):
> >
>
> What version of Boost are you using? The
> code doesn't compile with the current
> trunk because of a bug that prevents
> max_element from working in lambdas.
> After I fix that it works fine.
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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