|
Boost Users : |
Subject: Re: [Boost-users] [bind] Dereferencing placeholder argument
From: Ivan Le Lann (ivan.lelann_at_[hidden])
Date: 2011-09-09 11:52:34
----- "Szymon Gatner" <szymon.gatner_at_[hidden]> a écrit :
> 2011/9/9 Nat Linden <nat_at_[hidden]>:
> > On Fri, Sep 9, 2011 at 10:04 AM, Ivan Le Lann <ivan.lelann_at_[hidden]>
> wrote:
>
> >> Have you tried *_1 ?
> >
> > I think that works with boost::lambda::bind and boost::lambda::_1
> > (also, presumably, the corresponding constructs in Phoenix) but not
> > with plain boost::bind.
>
> Indeed I tried that - getting invalid indirection error.
Some time ago I offered a patch to add arithmetical operator support to Boost.Bind
and was answered : Use Lambda or Phoenix.
If you want to tweak Boost.Bind, which I would not encourage, maybe this could help :
http://boost.2283326.n4.nabble.com/Bind-Function-arithmetic-sample-impl-inside-tt2659446.html#none
As said, it is for arithmetical operators but might be adapted to your need.
Regards,
Ivan
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