id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3991,Boost::Python register_exception_translator doesn't work in c++0x.,foom@…,Dave Abrahams,"Error message: {{{ In file included from /usr/include/boost/python.hpp:28:0, from test.cpp:1: /usr/include/boost/python/exception_translator.hpp: In function ‘void boost::python::register_exception_translator(Translate, boost::type*) [with ExceptionType = std::out_of_range, Translate = void (*)(const std::out_of_range&)]’: test.cpp:6:92: instantiated from here /usr/include/boost/python/exception_translator.hpp:20:5: sorry, unimplemented: use of ‘type_pack_expansion’ in template /usr/include/boost/python/exception_translator.hpp:20:5: sorry, unimplemented: use of ‘type_pack_expansion’ in template /usr/include/boost/python/exception_translator.hpp:20:5: error: call of overloaded ‘bind(boost::python::detail::translate_exception, boost::arg<1>&, boost::arg<2>&, void (*&)(const std::out_of_range&))’ is ambiguous /usr/include/boost/bind/bind.hpp:1322:5: note: candidates are: boost::_bi::bind_t::type> boost::bind(F, A1, A2, A3) [with R = bool, F = boost::python::detail::translate_exception, A1 = boost::arg<1>, A2 = boost::arg<2>, A3 = void (*)(const std::out_of_range&), typename boost::_bi::list_av_3::type = boost::_bi::list3, boost::arg<2>, boost::_bi::value >] /usr/include/c++/4.5/functional:1390:5: note: std::_Bind_result<_Result, typename std::_Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes ...)> std::bind(_Functor, _ArgTypes ...) [with _Result = bool, _Functor = boost::python::detail::translate_exception, _ArgTypes = {boost::arg<1>, boost::arg<2>, void (*)(const std::out_of_range&)}, typename std::_Maybe_wrap_member_pointer<_Functor>::type = boost::python::detail::translate_exception] }}} When I compile with: {{{g++-4.5 -std=c++0x -I/usr/include/python2.6 -lboost_python -lpython2.6 test.cpp}}} Test file: {{{ #include void translate_out_of_range(std::out_of_range const& e) { PyErr_SetString(PyExc_IndexError, e.what()); } int main() { boost::python::register_exception_translator(&translate_out_of_range); } }}} The problem appears to be the collision between boost::bind and std::bind (new in c++0x). The fix is trivial: in boost/python/exception_translator.hpp line 21, simply use boost::bind(...) instead of bind(...) ",Bugs,closed,Boost 1.43.0,python USE GITHUB,Boost 1.42.0,Problem,fixed,,