Possible Duplicate:
demote boost::function to a plain function pointer
So I use Flash C++ Compiler (aka flascc, alchemy) and havin code like:
boost::function<var (void*, var)> f = boost::bind(&as3_socket::socket_socketData, this, _1, _2);
socket->addEventListener(flash::events::ProgressEvent::SOCKET_DATA, Function::_new(f, NULL));
get next compiler error:
$ g++ $JN -static -emit-llvm -c src/utils/http/as3_socket.cpp -I../boost/boost_libraries/install-dir/include
src/utils/http/as3_socket.cpp: In constructor ‘as3_socket::as3_socket()’:
src/utils/http/as3_socket.cpp:75: error: no matching function for call to ‘AS3::ui::Function::_new(boost::function<AS3::ui::var ()(void*, AS3::ui::var)>*, NULL)’
/cygdrive/c/Users/Avesta/Downloads/FlasCC_1.0.1134176_11-09-2012/sdk/usr/bin/../../usr/include/AS3++/builtin.h:179: note: candidates are: static AS3::ui::Function AS3::ui::Function::_new()
/cygdrive/c/Users/Avesta/Downloads/FlasCC_1.0.1134176_11-09-2012/sdk/usr/bin/../../usr/include/AS3++/builtin.h:180: note: static AS3::ui::Function AS3::ui::Function::_new(AS3::ui::var (*)(void*, AS3::ui::var), void*)
So the question is how to get from boost::function<var (void*, var)>
more C style var (*)(void*, var)