Overloading opCast with multiple types
Stewart Gordon
smjg_1998 at yahoo.com
Tue Oct 3 03:51:50 PDT 2006
pragma wrote:
<snip>
> Well, while we're on the topic, I might as well mention this variant as
> well. :)
>
> class Foobar{
> void* opCast(TypeInfo type){
> /* perform cast and return instance/value as needed
> }
> }
<snip>
How can you return an artibrary value as a void*? Besides, it looks
exactly like what you proposed ages ago and I've already critiqued, as
you'd know if you'd read what I linked to.
Stewart.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
More information about the Digitalmars-d
mailing list