From e369bddc8444cabdc7b3049a735d76f59780d2dc Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Mon, 26 May 2003 19:06:00 +0000 Subject: [PATCH] avoid use of sizeof to enable compilation with buggy gcc 3.3; change as per David Abrahams' instructions [SVN r18549] --- include/boost/python/converter/as_to_python_function.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/boost/python/converter/as_to_python_function.hpp b/include/boost/python/converter/as_to_python_function.hpp index 3c2f97e5..fc4446a0 100644 --- a/include/boost/python/converter/as_to_python_function.hpp +++ b/include/boost/python/converter/as_to_python_function.hpp @@ -19,16 +19,13 @@ struct as_to_python_function // the first overload ensures it isn't used in case T is a // reference. template - static int convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0); + static void convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0) {} template - static int convert_function_must_take_value_or_const_reference(U(*)(T const&), long ...); + static void convert_function_must_take_value_or_const_reference(U(*)(T const&), long ...) {} static PyObject* convert(void const* x) { - BOOST_STATIC_ASSERT( - sizeof( - convert_function_must_take_value_or_const_reference(&ToPython::convert, 1L)) - == sizeof(int)); + convert_function_must_take_value_or_const_reference(&ToPython::convert, 1L); // Yes, the const_cast below opens a hole in const-correctness, // but it's needed to convert auto_ptr to python.