[C++-sig] Regression in Boost.Python v1.33

Niall Douglas s_sourceforge at nedprod.com
Wed Oct 12 16:26:14 CEST 2005

Any movement on the below? Do you want me to submit a patch to 
type_traits or just to BPL?


On 1 Oct 2005 at 0:58, Niall Douglas wrote:

> On 30 Sep 2005 at 19:01, David Abrahams wrote:
> > You yourself said that void* isn't supported:
> It's only unsupported because BPL hasn't been coded to support it. 
> One can specialise for the void type after all, it's just a rather 
> unique integral type.
> >   http://www.boost.org/libs/python/doc/v2/faq.html#voidptr
> > 
> > Are you sure that this change is portable, or is it just exploiting a
> > vc7.1 bugfeature?
> As the test case I posted illustrates, I am using no dodgy casting 
> whatsoever. This is simply a case where MSVC7.1 isn't able to deduce 
> from a void& return type, probably because void& can't exist and 
> type_traits::add_reference<> somehow bypasses MSVC's sanity check for 
> this.
> The question now becomes how to work around it. Here are my 
> solutions:
> 1. The best solution is to patch type_traits::add_reference<> with a 
> specialisation for void whereby it won't ever add a reference to a 
> void. AFAIK it's an illegal type anyway. While you're at it, patch 
> type_traits::add_cv<> to never add const volatile to void either as 
> that also never makes sense.
> 2. The other solution is to replace registered.hpp with what I have 
> attached. I particularly dislike the "const volatile void" template 
> specialisation :(
> Cheers,
> Niall

More information about the Cplusplus-sig mailing list