// Copyright David Abrahams 2004. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include // gcc 2.95.x, MIPSpro 7.3.1.3 and IBM XL for Linux linker seem to demand this definition #if (defined(__GNUC__) && (__GNUC__ < 3)) \ || (defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238)) \ || (defined(__IBMCPP__) && defined(__linux__)) 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_arg_from_python::type, arg_rvalue_from_python ); ASSERT_SAME( select_arg_from_python::type, arg_rvalue_from_python ); ASSERT_SAME( select_arg_from_python::type, arg_rvalue_from_python ); ASSERT_SAME( select_arg_from_python::type, arg_rvalue_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, arg_rvalue_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_cref_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_cref_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_cref_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, pointer_cref_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); ASSERT_SAME( select_arg_from_python::type, reference_arg_from_python ); return result; }