4 Feb
2010
4 Feb
'10
4:50 p.m.
If I have class with to versions of member function: const and non-const, and I use bind to access this member function, then I get a lot of errors. 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?
4 Feb
4 Feb
5:11 p.m.
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);
5399
Age (days ago)
5399
Last active (days ago)
2 comments
2 participants
participants (2)
-
dilas dilas
-
Igor R