digitalmars.D.learn - myFunc(U:MyClass...)(U args)
- tsalm <tsalm free.fr> Aug 21 2008
- bearophile <bearophileHUGS lycos.com> Aug 21 2008
- tsalm <tsalm free.fr> Aug 21 2008
Hi all,
I've got another problem with template. I want to do this :
void myFunc(U:MyClass...)(U args) { }
but dmd return an error :
found '...' when expecting ')'
...
Thanks in advance,
TSalm
Aug 21 2008
tsalm:I've got another problem with template. I want to do this : void myFunc(U:MyClass...)(U args) { }
This may be related to "Typesafe Variadic Functions": http://www.digitalmars.com/d/1.0/function.html So you may try this syntax: void myFunc(MyClass[] args...) { } Bye, bearophile
Aug 21 2008
Le Fri, 22 Aug 2008 00:22:59 +0200, bearophile <bearophileHUGS lycos.com> a écrit:tsalm:I've got another problem with template. I want to do this : void myFunc(U:MyClass...)(U args) { }
This may be related to "Typesafe Variadic Functions": http://www.digitalmars.com/d/1.0/function.html So you may try this syntax: void myFunc(MyClass[] args...) { } Bye, bearophile
sorry, i missed it. Thanks
Aug 21 2008








tsalm <tsalm free.fr>