Hi all,
This is a follow up to my previous message on boost::bind question.
Please go thru the attached program.
I've 2 structures X an Y, and i'm calling stable_sort on vectors of both the objects.
But in one stable sort, i'm using the member variable directly, and in the other i'm using a member function to access that.
When i use boost::bind with member variable directly, it has no problem (structure Y),
But if i use member function to access the member variable, which is private, i'm getting compilation errors, The essence of the compilation error is given below..
=====================
./boost/include/boost/lambda/detail/actions.hpp:86: error: no matching function for call to `boost::lambda::function_adaptor<int (X::*)()>::apply(int (X::*const&)(), const X&)'
./boost/include/boost/lambda/detail/function_adaptors.hpp:193: note: candidates are: static Result boost::lambda::function_adaptor<Result (Object::*)()>::apply(Result (Object::*)(), Object*) [with RET = int, Object = X, Result = int]
./boost/include/boost/lambda/detail/function_adaptors.hpp:197: note: static Result boost::lambda::function_adaptor<Result (Object::*)()>::apply(Result (Object::*)(), Object&) [with RET = int, Object = X, Result = int]
=====================
what am i doing wrong.
thanks in advance,
Surya