Template bugged?
Patrick Kreft
patrick_kreft at gmx.net
Tue Sep 18 11:56:27 PDT 2007
Ok i like C++ Template more :)
BCS schrieb:
> Reply to Patrick,
>
> lets rearrange that a bit
>
> class application(applogic)
> {
> this() { new applogic(); }
> }
>
> class HelloWorld2 : public application!(HelloWorld2)
> {
> }
>
> int main() { new HelloWorld2(); }
>
> now without the template stuff
>
> class application(applogic)
> {
> this() { new HelloWorld2(); }
> }
>
> class HelloWorld2 : public application
> {
> //implict this() made explict
> this(){super();}
> }
>
> int main() { new HelloWorld2(); }
>
> new HelloWorld2 calls HelloWorld2.this HelloWorld2.this calls
> application.this
> application.this calls new HelloWorld2
>
> loop
>
>
More information about the Digitalmars-d
mailing list