Re: I think this is a bug...
- From: "Holger Grund" <holger.grund@xxxxxxxxxxxxxxx>
- Date: Tue, 6 Dec 2005 17:29:43 +0100
"Peter Oliphant" <poliphant@xxxxxxxxxxxxxxxx> wrote
>
> value struct Test_Struct
> {
> long x ;
> } ;
>
[..]
> Test_Struct info ;
>
> Test_Method( info ) ; // shouldn't compile, but does!!!
> Test_Method( %info ) ; // ok
> }
>
> void Test_Method( Test_Struct^ info ) {}
> } ;
I think it's feature. That's "implicit boxing". There's
a boxing conversion from every V to V^ to support
certain types of polymorphism.
For instance, you couldn't write
Console::WriteLine( info );
without it.
You can think of every Value type having a magic
member
value struct V { V^ operator() const; };
Now there's a conversion sequence from gclvalue V
to Object^ via the boxing conversion followed by
the base class handle conversion.
-hg
.
- Follow-Ups:
- Re: I think this is a bug...
- From: Peter Oliphant
- Re: I think this is a bug...
- References:
- I think this is a bug...
- From: Peter Oliphant
- I think this is a bug...
- Prev by Date: Re: string class and vc++.wank :)
- Next by Date: Re: string class and vc++.wank :)
- Previous by thread: I think this is a bug...
- Next by thread: Re: I think this is a bug...
- Index(es):
Relevant Pages
|
Loading