Boost logo

Boost :

From: Dan Nuffer (dnuffer_at_[hidden])
Date: 2002-11-05 23:41:04


When compiling a Boost.Python, gcc outputs these warnings:

/home/dan/software/boost_1_29_0/boost/python/operators.hpp:280:37:
warning: pasting "operator" and "|=" does not give a valid preprocessing
token
... lots of the same ...
/home/dan/software/boost_1_29_0/boost/python.hpp:62:8: warning: extra
tokens at
end of #endif directive

Here's a patch to fix the defective code:

diff -upNr boost_1_29_0.orig/boost/python/operators.hpp
boost_1_29_0/boost/python/operators.hpp
--- boost_1_29_0.orig/boost/python/operators.hpp Wed Oct 9 10:58:27
2002
+++ boost_1_29_0/boost/python/operators.hpp Tue Nov 5 21:30:49 2002
@@ -175,7 +175,7 @@ namespace self_ns
  { \
    template <class L, class R> \
    inline detail::operator_<detail::op_##id,L,R> \
- operator##op(L const&, R const&) \
+ operator op(L const&, R const&) \
    { \
        return detail::operator_<detail::op_##id,L,R>(); \
    } \
@@ -262,7 +262,7 @@ namespace self_ns
  { \
    template <class R> \
    inline detail::operator_<detail::op_##id,self_t,R> \
- operator##op(self_t const&, R const&) \
+ operator op(self_t const&, R const&) \
    { \
        return detail::operator_<detail::op_##id,self_t,R>(); \
    } \
diff -upNr boost_1_29_0.orig/boost/python.hpp boost_1_29_0/boost/python.hpp
--- boost_1_29_0.orig/boost/python.hpp Thu Oct 10 07:10:51 2002
+++ boost_1_29_0/boost/python.hpp Tue Nov 5 21:29:06 2002
@@ -59,4 +59,4 @@
  # include <boost/python/type_id.hpp>
  # include <boost/python/with_custodian_and_ward.hpp>

-#endif PYTHON_DWA2002810_HPP
+#endif // PYTHON_DWA2002810_HPP


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk