
It seems that the compiler cannot select between the "select" functions: template<class Arg, CALL_TEMPLATE_ARGS> inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type select ( const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) { return op.template call< typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
(CALL_ACTUAL_ARGS); } template<class Arg, CALL_TEMPLATE_ARGS> inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type select ( lambda_functor<Arg>& op, CALL_FORMAL_ARGS) { return op.template call< typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::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 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:
"./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-0219 (S) The call to "detail::select" has no best match. "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1228 (I) Argument number 1 is an lvalue of type "const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost ::lambda: :bitwise_action<boost::lambda::leftshift_action>,boost::tuples::tuple< std::basi c_ostream<char,std::char_traits<char> > &,boost::lambda::lambda_functor<boost::lambda::placeholder<1>
,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::nul l_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_ty pe,boost: :tuples::null_type,boos...". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1228 (I) Argument number 2 is an lvalue of type "int". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1228 (I) Argument number 3 is an lvalue of type "const boost::tuples::null_type". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1228 (I) Argument number 4 is an lvalue of type "const boost::tuples::null_type". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1228 (I) Argument number 5 is an lvalue of type "const boost::tuples::null_type". "./boost/lambda/detail/select_functions.hpp", line 27.1: 1540-1202 (I) No candidate is better than "boost::lambda::detail::select<boost::lambda::lambda_functor_base<boos t::l ambda::bitwise_action<boost::lambda::leftshift_action>,boost::tuples:: tuple<std ::basic_ostream<char,std::char_traits<char> > &,boost::lambda::lambda_functor<boost::lambda::placeholder<1> ,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::nul l_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_ty pe,boost: :tuples::null_type,boost::tuples::null_type>...". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 1 to "const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost ::lambda: :bitwise_action<boost::lambda::leftshift_action>,boost::tuples::tuple< std::basi c_ostream<char,std::char_traits<char> > &,boost::lambda::lambda_functor<boost::lambda::placeholder<1> ,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::nul l_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::nu..." uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 2 to "int &" uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 3 to "const boost::tuples::null_type &" uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 4 to "const boost::tuples::null_type &" uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 5 to "const boost::tuples::null_type &" uses "the identity conversion". "./boost/lambda/detail/select_functions.hpp", line 22.13: 1540-1202 (I) No candidate is better than "boost::lambda::detail::select<const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost ::lambda: :bitwise_action<boost::lambda::leftshift_action>,boost::tuples::tuple< std::basi c_ostream<char,std::char_traits<char> > &,boost::lambda::lambda_functor<boost::lambda::placeholder<1> ,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::nul l_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_ty pe,boost: :tuples:...". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 1 to "const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost ::lambda: :bitwise_action<boost::lambda::leftshift_action>,boost::tuples::tuple< std::basi c_ostream<char,std::char_traits<char> > &,boost::lambda::lambda_functor<boost::lambda::placeholder<1> ,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::nul l_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::nu..." uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 2 to "int &" uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 3 to "const boost::tuples::null_type &" uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 4 to "const boost::tuples::null_type &" uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-1231 (I) The conversion from argument number 5 to "const boost::tuples::null_type &" uses "the identity conversion". "./boost/lambda/detail/operator_lambda_func_base.hpp", line 212.1: 1540-0700 (I) The previous message was produced while processing "boost::lambda::lambda_functor_base<class boost::lambda::bitwise_action<boost::lambda::leftshift_action>,class boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::lamb da_functo r_base<boost::lambda::bitwise_action<boost::lambda::leftshift_action>, boost::tu ples::tuple<std::basic_ostream<char,std::char_traits<char> > &,boost::lambda::lambda_functor<boost::lambda::placeholder<1> ,boost::tuples::null_type,boost::tuples::null_t...". "./boost/lambda/detail/lambda_functors.hpp", line 145.3: 1540-0700 (I) The previous message was produced while processing "boost::lambda::lambda_functor<class boost::lambda::lambda_functor_base<boost::lambda::bitwise_action<boost ::lambda: :leftshift_action>,boost::tuples::tuple<boost::lambda::lambda_functor< boost::la mbda::lambda_functor_base<boost::lambda::bitwise_action<boost::lambda: :leftshif t_action>,boost::tuples::tuple<std::basic_ostream<char,std::char_trait s<char> &,boost::lambda::lambda_functor<boost::lambda::placeholder<1> ,boost::tuples::null_ty...". "/usr/vacpp/include/algorithm", line 77.13: 1540-0700 (I) The previous message was produced while processing "std::for_each<std::_Ptrit<int,long,int *,int &,int *,int &>,boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<bo ost::lamb da::bitwise_action<boost::lambda::leftshift_action>,boost::tuples::tup le<boost: :lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lamb da::bitwi se_action<boost::lambda::leftshift_action>,boost::tuples::tuple<std::b asic_ostr eam<char,std::char_traits<char> > &,boost::lambda::lambda_functor<...". "test.cpp", line 13.3: 1540-0700 (I) The previous message was produced while processing "main()".
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users