From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- .../libs/python/test/select_arg_to_python_test.cpp | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/boost/libs/python/test/select_arg_to_python_test.cpp (limited to 'src/boost/libs/python/test/select_arg_to_python_test.cpp') diff --git a/src/boost/libs/python/test/select_arg_to_python_test.cpp b/src/boost/libs/python/test/select_arg_to_python_test.cpp new file mode 100644 index 000000000..c5faace36 --- /dev/null +++ b/src/boost/libs/python/test/select_arg_to_python_test.cpp @@ -0,0 +1,70 @@ +// 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 +#include +#include + +// gcc 2.95.x and MIPSpro 7.3.1.3 linker seem to demand this definition +#if ((defined(__GNUC__) && __GNUC__ < 3)) \ + || (defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238)) +namespace boost { namespace python { +BOOST_PYTHON_DECL bool handle_exception_impl(function0) +{ + return true; +} +}} +#endif + +int result; + +#define ASSERT_SAME(T1,T2) assert_same< T1,T2 >() + +template +void assert_same(U* = 0, T* = 0) +{ + BOOST_STATIC_ASSERT((boost::is_same::value)); + +} + + +int main() +{ + using namespace boost::python::converter::detail; + using namespace boost::python::converter; + using namespace boost::python; + using namespace boost; + + + ASSERT_SAME( + select_arg_to_python::type, value_arg_to_python + ); + + ASSERT_SAME( + select_arg_to_python >::type, reference_arg_to_python + ); + + ASSERT_SAME( + select_arg_to_python >::type, pointer_shallow_arg_to_python + ); + + ASSERT_SAME( + select_arg_to_python::type, pointer_deep_arg_to_python + ); + + ASSERT_SAME( + select_arg_to_python >::type, object_manager_arg_to_python > + ); + + ASSERT_SAME( + select_arg_to_python::type, object_manager_arg_to_python + ); + + ASSERT_SAME( + select_arg_to_python::type, arg_to_python + ); + + return result; +} -- cgit v1.2.3