Using typedefed types as covariant return types
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Mon Feb 12 08:40:22 PST 2007
Frits van Bommel wrote:
> Bruno Medeiros wrote:
>> Rick Mann wrote:
>>> Bill Baxter Wrote:
>>> "A typedef or enum can be implicitly converted to its base type, but
>>> going the other way requires an explicit conversion. "
>>
>> Implicitly convertible doesn't mean a type is a subtype of another.
>> Altough in this case of typedef and enums I think they could be
>> subtypes of the base type.
>
> Perhaps he meant the "to its base type" part? I could see someone mixing
> that up with the same term used in class hierarchies...
True enough, that may cause some confusion.
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list