apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: [PATCH] Type conversion needed for C++
Date Mon, 28 May 2001 18:08:27 GMT
Greg Stein wrote:

>Adding the cast just doesn't seem right. We implicitly cast void* to other
>things all the time. Why does *this* one break things? I just don't buy the
>need to do the cast.
>Really... void* should be automatically castable to anything.
In C, yes. In C++, implicit casting from void* is not allowed. you need 
a static_cast (or dynamic_cast, depending on context).

Brane ─îibej
    home:   <brane@xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <brane@acm.org>            http://www.acm.org/

View raw message