P
Peteroid
I'm creating managed classes in an managed application, and believe I've
seen the following generate a compile error:
__gc class Parent_Class {} ;
__gc class Child_Class : public Parent_Class {} ;
__gc class Other_Class
{
public:
void Method_1( Parent_Class** pc_ptr_ptr ) {}
void Method_2( )
{
Child_Class* child ;
Method_1( &child ) ; // error
}
} ;
The error is something like " can't convert Child_Class __gc* __gc* to
Parent_Class __gc* __gc* ".
This seems odd. Why can't it convert to pointer-to-a-pointer of a child to a
pointer-to-a-pointer of its parent class?
[==Peteroid==]
PS - its possible this is one of those "there is a bug somewhere else"
cases, but thought i'd write anyway....hehe
seen the following generate a compile error:
__gc class Parent_Class {} ;
__gc class Child_Class : public Parent_Class {} ;
__gc class Other_Class
{
public:
void Method_1( Parent_Class** pc_ptr_ptr ) {}
void Method_2( )
{
Child_Class* child ;
Method_1( &child ) ; // error
}
} ;
The error is something like " can't convert Child_Class __gc* __gc* to
Parent_Class __gc* __gc* ".
This seems odd. Why can't it convert to pointer-to-a-pointer of a child to a
pointer-to-a-pointer of its parent class?
[==Peteroid==]
PS - its possible this is one of those "there is a bug somewhere else"
cases, but thought i'd write anyway....hehe