[Issue 2962] ICE(glue.c) or bad codegen passing variable as template value parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 14 08:12:04 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2962





--- Comment #11 from Don <clugdbug at yahoo.com.au>  2009-08-14 08:12:03 PDT ---
(In reply to comment #10)
> (In reply to comment #8)
> > Actually I'm not sure if this a bug or an easter egg. The current behaviour of
> > template value parameters is: if it is a compile-time constant, instantiate the
> > template as a value. If it is a variable, instantiate it as an alias parameter.
> > 
> > That's actually quite cool.
> 
> Local variables have been passable as alias parameters for quite some time now.
>  :)

Yes, but if you declare a template parameter as 'alias', it can't accept
literals.
You can actually achieve the same effect with a tuple parameter, so this
behaviour should probably disappear.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list