templates and functions

David Nadlinger see at klickverbot.at
Mon Sep 26 09:05:51 PDT 2011


On 9/26/11 6:00 PM, Daniel wrote:
> /* Error : undefined identifier A */
> Test!A test() {
>      return new Test!(A);
> }

You are probably looking for

Test!A test(A)() …,

which is equivalent to

template test(A) {
   Test!A test() { … }
}

.

Also, you might want to ask questions like this on the 
digitalmars.D.learn sub-newsgroup.

David


More information about the Digitalmars-d mailing list