Kirill Lapshin <kir@lapshin.net> writes:
1. The way overrides are generated does not compile on MSVC8 (2005). Looks like the problem is in conversion of return type if return type is bool or enum. For example
virtual bool is_representative( ) const { bp::override func_is_representative = this->get_override( "is_representative" ); return func_is_representative( ); // errors out }
error C2440: 'return' : cannot convert from 'boost::python::detail::method_result' to 'bool' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
This is a compiler bug, which is worked around by the enclosed patch to boost/python/override.hpp: Note that your workaround would be more idiomatic if you wrote: return func_is_representative().as<bool>(); -- Dave Abrahams Boost Consulting www.boost-consulting.com