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

David Abrahams dave at boost-consulting.com
Sun Oct 5 22:29:04 CEST 2003

"Niall Douglas" <s_sourceforge at nedprod.com> writes:

> 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.

I'm sorry; I meant "do you know of a workaround I can use in the
Boost.Python internals?"

>> > 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.

Thanks, but if you really want to save me time, you'll submit the doc

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

I already passed it along.
Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list