Proposal: Treat static assert in template as instantiation error

Derek Parnell derek at nomail.afraid.org
Mon Aug 28 18:02:07 PDT 2006


On Mon, 28 Aug 2006 14:25:27 -0700, Kirk McDonald wrote:

> I propose that if a static assert is thrown from within a template, that 
> it be treated as a failed template instantiation. This would (the hope 
> is) result in the instantiation traceback being printed out. It would 
> allow coders to explicitly cause their templates to fail in a way that 
> is informative: Users would get both the message in the static assert as 
> well as the traceback information. I am sure this would be a great boon 
> to anyone writing or using template code.

Amen to that! A great suggestion.

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
29/08/2006 11:01:32 AM



More information about the Digitalmars-d mailing list