|
Boost : |
From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2003-03-18 21:42:56
--- David Abrahams <dave_at_[hidden]> wrote:
> Seems to me a special version of the code for
>
> BOOST_WORKAROUND(__GNUC__, == 2 && __GNUC_MINOR__ == 96)
>
> is in order.
We know that the special code works with 2.95.3 (according to Gottfried), so
I've made this:
# elif BOOST_WORKAROUND(__GNUC__, < 3)
Full patch attached. Tested with gcc 2.96 and cxx 6.5.1.
Ralf
Index: opaque_pointer_converter.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/python/opaque_pointer_converter.hpp,v
retrieving revision 1.2.2.4
diff -u -r1.2.2.4 opaque_pointer_converter.hpp
--- opaque_pointer_converter.hpp 18 Mar 2003 22:31:12 -0000 1.2.2.4
+++ opaque_pointer_converter.hpp 19 Mar 2003 02:39:19 -0000
@@ -116,7 +116,7 @@
// MSC works without this workaround, but needs another one ...
# define BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee) \
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(Pointee)
-# else
+# elif BOOST_WORKAROUND(__GNUC__, < 3)
# define BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee) \
namespace boost { namespace python { \
template<> \
@@ -127,6 +127,19 @@
inline type_info type_id<const volatile Pointee &>() { \
return type_info (typeid (Pointee *)); \
} \
+}}
+# else
+# define BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee) \
+namespace boost { namespace python { \
+ template<> \
+ inline type_info type_id(boost::type<Pointee>*) { \
+ return type_info (typeid (Pointee *)); \
+ } \
+ template<> \
+ inline type_info type_id( \
+ boost::type<const volatile Pointee &>*) { \
+ return type_info (typeid (Pointee *)); \
+ } \
}}
# endif
# endif // OPAQUE_POINTER_CONVERTER_HPP_
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk