The __abstract managed C++ extension

  • Thread starter Thread starter Edward Diener
  • Start date Start date
E

Edward Diener

In the Managed Extensions for C++ Reference, I read:

"Applying __abstract to a class or structure does not imply that the result
is a __gc class or __gc structure."

However in the Managed Extensions for C++ Specification I immediately read:

"The __abstract keyword can only be applied to a __gc class or __gc
interface."

which contradicts the previous assertion.

So the question is: can __abstract be applied to a non __gc class/interface,
and if so when would it be used ?
 
It means:

__abstract class Foo {}; // Error: __abstract does not imply __gc or
__interface
__abstract __gc class Foo {}; // OK
__abstract __gc __interface IFoo {}; // OK

Ronald Laeremans
Visual C++ team
 
Ronald said:
It means:

__abstract class Foo {}; // Error: __abstract does not imply __gc or
__interface
__abstract __gc class Foo {}; // OK
__abstract __gc __interface IFoo {}; // OK

Wouldn't it have been more logical, therefore, to have __abstract always
mean __gc also ?
 
We feel that it doesn't. For one because we reserve the right to have it
work with non __gc classes at some point in the future. But more importantly
because at least the concept "abstract" is completely orthogonal to the
concept of "gc-ness" despite the current implementation.

Ronald
 
Back
Top