digitalmars.D.learn - myFunc(U:MyClass...)(U args)
- tsalm (8/8) Aug 21 2008 Hi all,
- bearophile (7/9) Aug 21 2008 This may be related to "Typesafe Variadic Functions":
- tsalm (4/13) Aug 21 2008 sorry, i missed it.
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:sorry, i missed it. ThanksI'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