#include #include #include #if defined(__GNUC__) && __GNUC__ < 3 // 2.95.x linker seems to demand this definition namespace boost { namespace python { BOOST_PYTHON_DECL bool handle_exception_impl(function0) { return true; } }} #endif int result; #define ASSERT_SAME(T1,T2) \ if (!is_same< T1, T2 >::value) { \ std::cout << "*********************\n"; \ std::cout << python::type_id< T1 >() << " != " << python::type_id< T2 >() << "\n"; \ std::cout << "*********************\n"; \ result = 1; \ } int main() { using namespace boost::python::converter; using namespace boost; ASSERT_SAME( select_from_python::type, rvalue_from_python ); ASSERT_SAME( select_from_python::type, rvalue_from_python ); ASSERT_SAME( select_from_python::type, rvalue_from_python ); ASSERT_SAME( select_from_python::type, rvalue_from_python ); ASSERT_SAME( select_from_python::type, pointer_from_python ); ASSERT_SAME( select_from_python::type, pointer_from_python ); ASSERT_SAME( select_from_python::type, pointer_from_python ); ASSERT_SAME( select_from_python::type, pointer_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, rvalue_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, pointer_const_reference_from_python ); ASSERT_SAME( select_from_python::type, pointer_const_reference_from_python ); ASSERT_SAME( select_from_python::type, pointer_const_reference_from_python ); ASSERT_SAME( select_from_python::type, pointer_const_reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); ASSERT_SAME( select_from_python::type, reference_from_python ); return result; }