recursive template (first attempt)

akcom CppCoder at gmail.com
Thu Apr 20 11:24:49 PDT 2006


Ryan Steen wrote:
> In article <e26v01$2m8$1 at digitaldaemon.com>, akcom says...
> 
> 
>>		static if ( t.length == 0 )
>>		static if ( t.length & 1 )
>>main.d(49): expression ((t).length) == 0u does not evaluate to a boolean
>>main.d(53): expression ((t).length) & 1u does not evaluate to a boolean
> 
> 
> "It is an error if AssignExpression ... cannot be evaluated at compile time."
> 
> 
why can't it be computed at compile time if I make "str" static/const?



More information about the Digitalmars-d-learn mailing list