|
Boost Users : |
Subject: Re: [Boost-users] Problems with bind
From: Igor R (boost.lists_at_[hidden])
Date: 2010-02-04 12:11:59
> For example:
> struct A
> {
> Â Â Â Â void foo(void){};
> Â Â Â Â void foo(void)const{};
> };
>
> const A a;
> lambda::bind(&A::foo,lambda::_1 )(a);
>
> Can I do something to solve this problem?
Bind can't choose the right overload. You have to do this explicitly:
 const A a;
 typedef void (A::*ConstFoo)(void);
 bl::bind((ConstFoo)&A::foo, bl::_1);
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