How to build boost on aix with vacpp ?
Hi, I want to use boost on ibm-aix with VisualAge C++ Professional / C for AIX Compiler, Version 6 To do this: - I downloaded the version 1.33.1 of boost on sourceforge - I used the following configure statement to build the makefile configure --with-toolset=vacpp - I launched the make statement to build the libraries. But I encountered the following message during make process xlc-C++-action bin/boost/libs/regex/build/libboost_regex.so/vacpp/debug/cregex.o "/TST/FIED/murex/flex/boost_1_33_1/boost/regex/v4/regex_traits.hpp", line 80.1: 1540-1269 (S) The template argument for the non-type template parameter of type "bool" must be an integral constant expr ession. "/TST/FIED/murex/flex/boost_1_33_1/boost/regex/v4/regex_traits.hpp", line 159.36: 1540-0700 (I) The previous message was produced while processing "struct boost::re_detail::has_boost_extensions_tag<bo ost::regex_traits<char,boost::cpp_regex_traits<char> >,mpl_::bool_<0>
".
xlc -c -I/TST/FIED/murex/flex/boost_1_33_1 -DBOOST_REGEX_CONFIG_INFO=1 -DBOOST_REGEX_DYN_LINK=1 -qNOOPTimize -qnoinline -g -qfullpath -qnotempinc -qfuncsect -qeh -qrtti -I"bin/boost/libs/reg ex/build" -I"/TST/FIED/murex/flex/boost_1_33_1" -o "bin/boost/libs/regex/build/libboost_regex.so/vacpp/debug/cregex.o" "/TST/FIED/murex/flex/boost_1_33_1/libs/regex/build/../src/cregex.cpp" ...failed xlc-C++-action bin/boost/libs/regex/build/libboost_regex.so/vacpp/debug/cregex.o... Any hints for resolving this would be appreciated. Thanks in advance. -------------------------------------- Dexia Bank disclaimer : http://www.dexia.be/maildisclaimer.htm --------------------------------------
Parmentier Jean-Luc (DBB) wrote:
Hi,
I want to use boost on ibm-aix with VisualAge C++ Professional / C for AIX Compiler, Version 6 To do this: - I downloaded the version 1.33.1 of boost on sourceforge - I used the following configure statement to build the makefile configure --with-toolset=vacpp - I launched the make statement to build the libraries.
Unfortunately that compiler has dropped off our regular testing through the lack of a volunteer :-( Try defining BOOST_NO_SFINAE in boost/config/compiler/vacpp.hpp and see if that fixes things. HTH, John.
John Maddock <john <at> johnmaddock.co.uk> writes:
Parmentier Jean-Luc (DBB) wrote:
Hi,
I want to use boost on ibm-aix with VisualAge C++ Professional / C for AIX Compiler, Version 6 To do this: - I downloaded the version 1.33.1 of boost on sourceforge - I used the following configure statement to build the makefile configure --with-toolset=vacpp - I launched the make statement to build the libraries.
Unfortunately that compiler has dropped off our regular testing through the lack of a volunteer
Try defining BOOST_NO_SFINAE in boost/config/compiler/vacpp.hpp and see if that fixes things.
HTH, John.
,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,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
,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,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::null_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::null_type,bo ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,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::null_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
,boost::tuples::null_type,boost::tuples::null_t...". "./boost/lambda/detail/lambda_functors.hpp", line 145.3: 1540-0700 (I) The
&,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<boost::lamb da::bitwise_action<boost::lambda::leftshift_action>,boost::tuples::tuple<boost: :lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::bitwi se_action<boost::lambda::leftshift_action>,boost::tuples::tuple<std::basic_ostr eam<char,std::char_traits<char> > &,boost::lambda::lambda_functor<...". "test.cpp", line 12.3: 1540-0700 (I) The previous message was produced while
Hello, I would appreciate any help with this. I am not trying to build shared libraries - I am just trying to use the headers. 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> than "boost::lambda::detail::select<boost::lambda::lambda_functor_base<boost::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> 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::lambda_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> 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_traits<char> processing "main()".
Jerry Jeremiah wrote:
John Maddock <john <at> johnmaddock.co.uk> writes:
Parmentier Jean-Luc (DBB) wrote:
Hi,
I want to use boost on ibm-aix with VisualAge C++ Professional / C for AIX Compiler, Version 6 To do this: - I downloaded the version 1.33.1 of boost on sourceforge - I used the following configure statement to build the makefile configure --with-toolset=vacpp - I launched the make statement to build the libraries.
Unfortunately that compiler has dropped off our regular testing through the lack of a volunteer
Try defining BOOST_NO_SFINAE in boost/config/compiler/vacpp.hpp and see if that fixes things.
HTH, John.
Hello,
I would appreciate any help with this. I am not trying to build shared libraries - I am just trying to use the headers.
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::null_type,bo
ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,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<boost::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::null_type,bo
ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,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::null_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::null_type,bo
ost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,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::null_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::lambda_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_traits<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<boost::lamb da::bitwise_action<boost::lambda::leftshift_action>,boost::tuples::tuple<boost: :lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::bitwi se_action<boost::lambda::leftshift_action>,boost::tuples::tuple<std::basic_ostr eam<char,std::char_traits<char> > &,boost::lambda::lambda_functor<...". "test.cpp", line 12.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
I have successfully built the Boost filesystem library as a shared library as well as built other shared libraries that use Boost smart pointers on IBM VisualAge version6. What I have found that works is to specify -DBOOST_NO_INCLASS_MEMBER_INITIALIZATION. I specify this on the bjam cmd-line to build Boost filesystem as a shared library as well as my build of my own SO which uses smart pointers and filesystem. Hope this helps, Ed
Hi, I've used BLL off an on for a while, but right now even the most basic bind won't work. Two of the following three binds don't work for me, and they are basically a copy if the bind examples... At this point I'm sure I'm doing something incredibly stupid, so can someone set me straight? #include <iostream> #include "boost/lambda/lambda.hpp" #include "boost/lambda/bind.hpp" using namespace boost::lambda; int g(int i) {std::cout << i<<std::endl; return i;}; int main() { bind(_1, 1)(g); // works bind(g, _1)(1); // nope bind(&g, _1)(1); // nope } This is with gcc 4.0.1 and boost 1.33.1. Thanks, /Patrik The errors are: junk.cc: In function 'int main()': junk.cc:10: error: no match for call to '(const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, int> >, boost::tuples::tuple<int (&)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >) (int)' /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:137: note: candidates are: typename T::sig<boost::tuples::null_type>::type boost::lambda::lambda_functor<Base>::operator()() const [with T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, int> >, boost::tuples::tuple<int (&)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >] /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:145: note: typename T::sig<boost::tuples::tuple<A&, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::type boost::lambda::lambda_functor<Base>::operator()(A&) const [with A = int, T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, int> >, boost::tuples::tuple<int (&)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >] junk.cc:11: error: no match for call to '(const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, boost::lambda::detail::unspecified> >, boost::tuples::tuple<int (* const)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >) (int)' /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:137: note: candidates are: typename T::sig<boost::tuples::null_type>::type boost::lambda::lambda_functor<Base>::operator()() const [with T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, boost::lambda::detail::unspecified> >, boost::tuples::tuple<int (* const)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >] /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:145: note: typename T::sig<boost::tuples::tuple<A&, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::type boost::lambda::lambda_functor<Base>::operator()(A&) const [with A = int, T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, boost::lambda::detail::unspecified> >, boost::tuples::tuple<int (* const)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >]
On Sep 29, 2006, at 9:15 AM, Patrik Jonsson wrote:
Hi,
I've used BLL off an on for a while, but right now even the most basic bind won't work. Two of the following three binds don't work for me, and they are basically a copy if the bind examples... At this point I'm sure I'm doing something incredibly stupid, so can someone set me straight?
#include <iostream> #include "boost/lambda/lambda.hpp" #include "boost/lambda/bind.hpp" using namespace boost::lambda;
int g(int i) {std::cout << i<<std::endl; return i;};
int main() { bind(_1, 1)(g); // works bind(g, _1)(1); // nope bind(&g, _1)(1); // nope }
There are two errors in your code. When C++ gets rvalue references, the two last calls will start working, but at this point, lambda functors do not accept non-const rvalues. 1 is a non-const rvalue. You can fix the two calls as: bind(g, _1)(make_const(1)); // nope bind(&g, _1)(make_const(1)); // nope Or there are other ways too, see http://www.boost.org/doc/html/lambda/ using_library.html#lambda.actual_arguments_to_lambda_functors Jaakko
This is with gcc 4.0.1 and boost 1.33.1. Thanks,
/Patrik
The errors are:
junk.cc: In function 'int main()': junk.cc:10: error: no match for call to '(const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost ::lambda::action<2, boost::lambda::function_action<2, int> >, boost::tuples::tuple<int (&)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >) (int)' /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:137: note: candidates are: typename T::sig<boost::tuples::null_type>::type boost::lambda::lambda_functor<Base>::operator()() const [with T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, int> >, boost::tuples::tuple<int (&)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >] /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:145: note: typename T::sig<boost::tuples::tuple<A&, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::type boost::lambda::lambda_functor<Base>::operator()(A&) const [with A = int, T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, int> >, boost::tuples::tuple<int (&)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >] junk.cc:11: error: no match for call to '(const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost ::lambda::action<2, boost::lambda::function_action<2, boost::lambda::detail::unspecified> >, boost::tuples::tuple<int (* const)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >) (int)' /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:137: note: candidates are: typename T::sig<boost::tuples::null_type>::type boost::lambda::lambda_functor<Base>::operator()() const [with T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, boost::lambda::detail::unspecified> >, boost::tuples::tuple<int (* const)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >] /Users/patrik/include/boost/lambda/detail/lambda_functors.hpp:145: note: typename T::sig<boost::tuples::tuple<A&, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::type boost::lambda::lambda_functor<Base>::operator()(A&) const [with A = int, T = boost::lambda::lambda_functor_base<boost::lambda::action<2, boost::lambda::function_action<2, boost::lambda::detail::unspecified> >, boost::tuples::tuple<int (* const)(int), const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >]
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (6)
-
Ed Rubright - mail lists
-
Jaakko Jarvi
-
Jerry Jeremiah
-
John Maddock
-
Parmentier Jean-Luc (DBB)
-
Patrik Jonsson