Boost logo

Boost :

From: Jason Shirk (jasonsh_at_[hidden])
Date: 2001-11-08 21:30:02


You are probably including <functional> which has a class template
modulus.
If so, this is indeed a bug in VC6, and you've found the workaround.
This problem has been fixed for VC7.

Jason Shirk
VC++ Compiler Team

> -----Original Message-----
> From: elaine_y_at_[hidden] [mailto:elaine_y_at_[hidden]]
> Sent: Thursday, November 08, 2001 4:04 PM
> To: boost_at_[hidden]
> Subject: [boost] class template conflict in classes.hpp
>
> Hi,
>
> 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, PyObject*
> exponent, PyObject* modulus) const
> {
> return downcast<T>(obj)->power(exponent, modulus);
> }
>
> If I change the two instances of the word "modulus" to something else
> (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 the
> word "modulus" in it.
>
> Any ideas?
>
> Thanks,
> Elaine
>
>
> Info: http://www.boost.org Unsubscribe: <mailto:boost-
> unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>


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