[C++-sig] Re: Pyste suggestion for handling returns of void *
nicodemus at globalite.com.br
Sun Oct 5 04:05:03 CEST 2003
Niall Douglas wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>On 4 Oct 2003 at 8:02, David Abrahams wrote:
>>>This probably leaves out virtual functions and may cause problems
>>>with getting the address of overloaded methods. Still some support
>>>for void * returns is better than none.
>>This isn't what I'd call "support for void* returns". We should
>>return and accept void*s as opaque pointers.
>No it's a nasty hack to temporarily fix a problem.
Why you think that? In your proposed solution, you wanted to ignore the
returning void*, which I think it's worse, at least as an generic
solution... you can always ignore the opaque pointer that is returned
> I agree opaque
>pointers should support void * but AFAICS the code currently doesn't
>support them. I thought you can specialise a template for <void> or
Hmm, I didn't know that.
Another solution that meets your idea (ignoring the returning void*) is
generating wrapper functions, but that's certainly more work.
More information about the Cplusplus-sig