Boost logo

Boost :

From: Gottfried.Ganssauge_at_[hidden]
Date: 2003-03-18 09:16:34


> "Ralf W. Grosse-Kunstleve" <rwgk_at_[hidden]> writes:
>
> > There are gcc 2.96 (Redhat 7.3) compilation error for
> > boost/libs/python/test/opaque.cpp:
> >
> > http://cci.lbl.gov/~rwgk/tmp/rc_1_30_0_opaque_fail.txt
> >
> > More recent gcc's don't seems to suffer from this problem.
> > I am not sure this is important enough to delay the release
> any further.
> > David?
> >
> > Ralf
>
> Hmm, looking at:
>
> # define BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee) \
> namespace boost { namespace python { \
> template<> \
> inline type_info type_id(boost::type<Pointee>*) { \
> return type_info (typeid (Pointee *)); \
> } \
> template<> \
> inline type_info type_id( \
> boost::type<const volatile Pointee &>*) { \
> return type_info (typeid (Pointee *)); \
> } \
> }}
>
> it seems to me that these aren't actually legal specializations
> (though I've never specialized functions before so I could be wrong).
> Shouldn't that be:
>
> template <>
> inline type_info type_id<Pointee>(boost::type<Pointee>*) {
> return type_info(typeid(Pointee*));
> }
>
> template <>
> inline type_info type_id<const volatile Pointee&>(
> boost::type<const volatile Pointee&>*) {
> return type_info(typeid(Pointee*));
> }
>
You're probably right, but the other compilers didn't complain...
Anyway, that wasn't the cause of the problem;
the problem seems to be that gcc-2.9x doesn't recognize the defaulted
argument but insists on having an argument anyway.
Now i have changed my specializations such that these have *no* arguments
and now it works on all my compilers (MSVC6, VC7.1ß, gcc-2.95.3, gcc-3.2).

...

>
> It would be nice if Gottfried could try to get something working for
> GCC 2.96 before we ship, since RedHat kindly put it on so many
> systems.
Unfortunately I haven't got a RedHat Version at my disposal but I hope
gcc-2.95.3 is close enough.

>
> Gottfried?
The attached patch is against the RC_1_30_0 CVS which I got an hour ago.

Cheers,

Gottfried




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