Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-28 14:18:51


----- Original Message -----
From: "Tom Malcolmson" <tom-list_at_[hidden]>

> I'm using VC6 SP4 on Win2K SP1, with:
> Boost 1.21.1 with Python 2.0.
> Dinkum STL (the bundled version)
> wxWindows 2.2.5
>
> I add the following line to my Win32 DLL:
> #include <boost/python/class_builder.hpp>
>
> This causes the following error msg:
> e:\devcode\boost\boost\python\classes.hpp(379) : error C2955: 'modulus' :
> use of class template requires template argument list
> e:\devapps\vstudio\vc98\include\functional(57) : see declaration
of
> 'modulus'
>
> The line referenced in the error msg (from classes.hpp) is:
> template <class T> PyObject* class_t<T>::instance_number_power(PyObject*
> obj, PyObject* exponent, PyObject* modulus) const
>
> Modulus is defined in 'functional' (which is included by map in my STL),
by
> why isn't it protected by a namespace? I fixed the problem by renaming
> 'modulus' (then everything works fine), but this is obviously not a good
> solution.

Do you have "using namespace std" somewhere? There shouldn't be a name
conflict at all, but it seems likely that VC6 would give you problems if you
had employed a using-directive. I suggest a grep through the preprocessed
source file.

> Tinkering around I find that I can get it to compile if I cut out the
> wxWindows library, but the wxWindows library doesn't use the namespaces or
> the STL in any way.

Hmm. I can imagine that one way it goes is: wxwindows #includes <stdio.h>,
which looks like #include <cstdio> + using namespace std;

> I'm not expecting anyone to have experience with this particular combo of
> libraries, but I'm wondering if you've experienced something like this?
Or
> is there something obvious that I'm missing?
>
> (BTW, I am familiar with STLport, and I consider it superior to Dinkum,
but
> I'm currently having some other problems with it and it wouldn't help with
> this problem anyway.)

Well, it might, if my theory about "using namespace std" were correct.
STLport puts everything in namespace _STL or _STLD

-Dave


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