From: Jonathan Caves (joncaves_at_[hidden])
Date: 2001-11-08 20:46:42
--- In boost_at_y..., elaine_y_at_y... wrote:
> I've used boost python in the past without problems.
> Now I'm trying to help someone else wrap their code and, strangely
> enough, when we try to compile against the boost_python library we
> get the following error from Visual C++:
> boost_python\boost\python\classes.hpp(379) : error
C2955: 'modulus' :
> use of class template requires template argument list
> c:\program files\microsoft visual
> studio\vc98\include\functional(57) : see declaration of 'modulus'
> boost_python\boost\type_traits\ice.hpp(80) : fatal error C1506:
> unrecoverable block scoping error
> The line/code it is complaining about is the following:
> template <class T>
> PyObject* class_t<T>::instance_number_power(PyObject* obj,
> exponent, PyObject* modulus) const
> return downcast<T>(obj)->power(exponent, modulus);
> If I change the two instances of the word "modulus" to something
> (like "modulusx") and recompile boost_python and then try to compile
> the code with boost_python, that solves the problem.
> The source code we are trying to use doesn't have any instances of
> word "modulus" in it.
> Any ideas?
Elaine - you should try to preprocess the file (use the /P switch)
and then search the generated *.i file for "modulus". Your
description of the problem and the fix seems to indicate that there
must be a class template modulus in the sources somewhere.
If this does not solve your problem then feel free to contact me
private and I'll try to work out what is going on.
BTW: which version of the Visual C++ compiler are you using?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk