digitalmars.D.learn - subclassing templated class
- spir (10/10) Dec 26 2010 Hello,
- Simen kjaeraas (4/10) Dec 26 2010 Yes.
- Stanislav Blinov (3/10) Dec 26 2010 Absolutely:
- Simen kjaeraas (4/16) Dec 26 2010 You're right. I did not notice the lack of an exclamation mark.
- spir (7/20) Dec 26 2010 Thank you! That's the syntactic bit I was missing. Logical, indeed...
Hello,
If I have
class Node (Element) {...}
can I subtype it like with
class Leaf (Element) : Node (Element) {...}
or such?
Denis
-- -- -- -- -- -- --
vit esse estrany =E2=98=A3
spir.wikidot.com
Dec 26 2010
spir <denis.spir gmail.com> wrote:
Hello,
If I have
class Node (Element) {...}
can I subtype it like with
class Leaf (Element) : Node (Element) {...}
or such?
Yes.
--
Simen
Dec 26 2010
On 12/26/2010 05:47 PM, spir wrote:
Hello,
If I have
class Node (Element) {...}
can I subtype it like with
class Leaf (Element) : Node (Element) {...}
or such?
Denis
Absolutely:
class Leaf(Element) : Node!Element {...}
Dec 26 2010
Stanislav Blinov <stanislav.blinov gmail.com> wrote:On 12/26/2010 05:47 PM, spir wrote:You're right. I did not notice the lack of an exclamation mark. -- SimenHello, If I have class Node (Element) {...} can I subtype it like with class Leaf (Element) : Node (Element) {...} or such? DenisAbsolutely: class Leaf(Element) : Node!Element {...}
Dec 26 2010
On Sun, 26 Dec 2010 17:54:22 +0300 Stanislav Blinov <stanislav.blinov gmail.com> wrote:Thank you! That's the syntactic bit I was missing. Logical, indeed... Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.comHello, If I have class Node (Element) {...} can I subtype it like with class Leaf (Element) : Node (Element) {...} or such? Denis =20=20 Absolutely: =20 class Leaf(Element) : Node!Element {...}
Dec 26 2010









"Simen kjaeraas" <simen.kjaras gmail.com> 