On Sun, Nov 16, 2008 at 3:52 PM, Ryan Bloomfield
<[EMAIL PROTECTED]> wrote:
> According to http://www.digitalmars.com/d/1.0/templates-revisited.html(under
> "Template Parameters") a template can be passed as a template argument. How
> does one do that? The compiler (gdc) give an error when I try to pass a
> template like a type(complains it isn't a type).
You use an alias parameter instead of a type parameter.
template A(alias Foo)
{
alias Foo!(int) A;
}
template B(T)
{
T B;
}
alias A!(B) x; // same as declaring "int x"