c++/7181: foo<n>::bar = foo<n-1>::bar + foo<n-2>::bar evaluates to zero at compile time

Paolo Carlini pcarlini@unitus.it
Tue Jul 2 13:50:00 GMT 2002

Mark Mitchell wrote:

> --On Tuesday, July 02, 2002 10:28:13 PM +0200 Paolo Carlini 
> <pcarlini@unitus.it> wrote:
>> Hi,
>> from a very practical point of view, would be difficult to restore the
>> behaviour of 2.95.x? Note that Intel and Comeau adopts that "particular"
>> initialization order and the current "equivalent" one ;-) breaks a whole
>> body of literature on template metaprogramming...
> Perhaps.  It may also be that picking one order makes this example work,
> but some similar example fail.

Thanks for your feedback. This one of yours is an important point, 
indeed. Anyone attempting to restore the old behaviour should first 
prove that it's really the "best" one in some non trivial sense. I had 
always believed it is, but...

Thanks again,

More information about the Gcc-bugs mailing list