Instantiating Templates Structs with defaults parameter
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Jun 9 10:02:51 PDT 2011
On 6/9/11 10:04 AM, d coder wrote:
>
> I don't know whether this should compile but there is a simple work
> around:
>
> alias Foo!() Bar;
>
> and then
>
> Bar bar;
>
> works as expected.
> Does it help?
>
>
> Actually it does not. Actually I am trying to create a DESL. For me this
> Foo Bar stuff kind of becomes user interface.
>
> Regards
> - Puneet
>
One simple issue is this:
template whatevs(T...) { ... }
whatevs!Foo; // did you mean to pass Foo or Foo!()? Both are legit!
Andrei
More information about the Digitalmars-d
mailing list