Does D support nested Templates aka Higher Kinded Polymorphism?

Daniel Kozak kozzi11 at gmail.com
Tue Oct 3 15:30:52 UTC 2017


writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)()));

Dne 3. 10. 2017 3:55 odpoledne napsal uživatel "sighoya via
Digitalmars-d-learn" <digitalmars-d-learn at puremagic.com>:

But when I write this to:

writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)));

it complains by:

test.d(11): Error: template instance T!(S!int) does not match template
declaration Bar(R, S)
test.d(11): Error: template instance T!(S!int) does not match template
declaration Bar(R, S)
test.d(17): Error: template instance test.bar!(Bar, Foo, int) error
instantiating
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20171003/6490b0d4/attachment.html>


More information about the Digitalmars-d-learn mailing list