
Can I use phoenix lambda in boost::python? Let's see:
------------------------------------
#include

At Thu, 03 Mar 2011 09:05:03 -0500, Neal Becker wrote:
Can I use phoenix lambda in boost::python? Let's see: ------------------------------------ #include
#include #include namespace bp=boost::python;
BOOST_PYTHON_MODULE (test_phoenix) { bp::def ("test1", &boost::phoenix::val(1)); } ----------------------------------------
Any suggestions? Here's what gcc-4.5 says:
Do the Boost.Python docs say you can wrap pointers to arbitrary function objects that way? I seriously doubt it. Part of the reason it can't work is that you're passing a pointer (pointers to actual functions are special) and part is that phoenix functions are compile-time polymorphic and take an arbitrary number of arguments. Boost.Python can't deduce the desired properties of the python function you want to generate from that. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (2)
-
Dave Abrahams
-
Neal Becker