Jaakko Jarvi
It seems that the compiler cannot select between the "select" functions:
template
inline typename Arg::template sig >::type select ( const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) { return op.template call< typename Arg::template sig >::type (CALL_ACTUAL_ARGS); } template
inline typename Arg::template sig >::type select ( lambda_functor<Arg>& op, CALL_FORMAL_ARGS) { return op.template call< typename Arg::template sig >::type (CALL_ACTUAL_ARGS); } As far as I can tell, the first one should be a better match for a "const lambda_functor<...>" type, as in your example, but for some reason the compiler seems to think both matches are equal.
Based on what I see here, I would blaim the compiler.
Jaakko
Hi Jaakko, Thank you. For the help deciphering the error messages. I gathered that the compiler couldn't choose between the functions, but was unable to understand why. When you wrote them down in isolation it was pretty obvious that the compiler should have been able to choose. I hate compilers. This one doesn't work, the aCC on my HP box doesn't work and my desktop's Visual C++ doesn't work. I wouldn't want to be a compiler writer - that's for sure. Jerry # On Sep 25, 2006, at 5:29 PM, Jerry Jeremiah wrote: # # > Hello, # > # > I would appreciate any help with this. I am trying to compile this # > test program on AIX with xlC (VisualAge C++ Professional / C for AIX # > Compiler, Version 6): # > # > #include <iostream> // cout # > #include <vector> // vector # > #include <algorithm> // for_each # > #include "boost/lambda/lambda.hpp" # > using namespace boost::lambda; # > main() { # > std::vector<int> a; # > a.push_back(1); # > std::for_each(a.begin(), a.end(), std::cout << _1 << ' '); # > } # > # > # > And I get: # > # > ...indecipherable error messages...