How is std.traits.isInstanceOf supposed to work?
Tommi
tommitissari at hotmail.com
Sun Nov 10 17:12:43 PST 2013
On Sunday, 10 November 2013 at 23:34:08 UTC, Dicebot wrote:
>
> I'd say "works as expected". 'alias this` is not equivalent to
> inheritance, it allows to type to completely act as another.
According to TDPL, 'alias this' makes the aliasing type a
'subtype' of the aliased type. If type X is a subtype of type Y,
it doesn't mean that X can completely act as Y. It means that
objects of type X can completely act as objects of type Y. Which
is not the same thing.
More information about the Digitalmars-d
mailing list