[C++-sig] Re: Boost.Python bug

Niall Douglas s_sourceforge at nedprod.com
Sun Oct 5 22:19:51 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5 Oct 2003 at 8:30, David Abrahams wrote:

> > Also, you know as well as I that the whole Boost library always
> > works around compiler idiosyncracies where possible. While it
> > isn't technically a BP bug, it does interfere with BP's implicit
> > goal of being useful on all major compilers.
> 
> So, do you know of a workaround?

Yes, the obvious one:

using namespace boost::python;

class FXThread
{
public:
    bool setAutoDelete(bool doso) throw();
};

void Export_FXThread()
{
    class_< FXThread >("FXThread")
  .def("setAutoDelete", (bool (FXThread::*)(bool)) 
&FXThread::setAutoDelete)
    ;
}

You just need to cast off the throw(). This probably makes undefined
behaviour though as some PCS's mangle their symbols differently for
null throw()'s though TBH I can't see how any PCS could penalise you
as the direction of effect is opposite.

> > If it can't be fixed, at least a FAQ entry saying it doesn't work
> > due to a bug in MSVC7.1 would be a good idea?
> 
> There are lots of corner cases which don't work on various compilers
> due to bugs in the compilers.  I don't feel the need to document
> each one that we discover.  HOwever, if you want to contribute an
> appropriate doc patch I'll gladly check it in.

Well I was more thinking of saving you time in having to deal with
support which I know sucks time from any maintainer.

Does anyone know a MS compiler person who'd like to take this bug?

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBP4B858EcvDLFGKbPEQI0zgCfQPt8Ni/LZSHi/4JJl/oh0H7Bz/AAnj0t
kmZ2NYUXy4byzp7XX5MyGNii
=1BJH
-----END PGP SIGNATURE-----




More information about the Cplusplus-sig mailing list