www.digitalmars.com         C & C++   DMDScript  

D - Nested Templates

reply J Anderson <anderson badmama.com.au.REMOVE> writes:
Any plans for nested templates? The following causes " Assertion 
failure: '0' on line 62 in file 'template.c' ".

template foo (T)
{
    template bar (T)
    {
    }
}


int main( char [] [] args )
{
    instance foo(int) temp;
    return 1;
}

In either case, it would be nice to have a better error message, rather 
then a compilation crash.

-Anderson
Oct 22 2003
parent "Walter" <walter digitalmars.com> writes:
That should work. It's a bug. :-(
Oct 24 2003