[C++-sig] Boost.Pyton v2 & gcc 2.95.3

Joel de Guzman djowel at gmx.co.uk
Fri Aug 30 11:06:54 CEST 2002


----- Original Message -----
From: "Peter Schoen" <Peter.Schoen1 at web.de>


Dear y'all,

is it possible to compile Boost.Python v2 using the gcc 2.95.3 compiler (I am
using SuSE 8)?

I tried to find the answer in the archive, but didn't succeed.

When I try to compile the lib with: "bjam -sTOOLS=gcc test", I get many
template related erros. If others were able to compile the lib using 2.95.3,
I can also post the error messages.

Many thanks & very best wishes

--------------------------------------------------------
Is this the error?

C:/dev/boost/boost/python/tuple.hpp:45: explicit specialization of non-template
`boost::python::converter::object_manager_traits<boost::python::tuple>'

If so, I have a fix. Just move the specialization before the instantiation:

//
// Converter Specializations    // $$$ JDG $$$ moved here to prevent
//                              // G++ bug complaining specialization
                                // provided after instantiation
namespace converter
{
  template <>
  struct object_manager_traits<tuple>
      : pytype_object_manager_traits<&PyTuple_Type,tuple>
  {
  };
}

// for completeness
inline tuple make_tuple() { return tuple(); }

# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PYTHON_MAX_ARITY,
<boost/python/detail/make_tuple.hpp>))
# include BOOST_PP_ITERATE()

I hope this helps.
--Joel







More information about the Cplusplus-sig mailing list