compile-time variables?

David B. Held dheld at codelogicconsulting.com
Wed May 30 22:11:42 PDT 2007


BCS wrote:
> [...]
> the closest you can get to resize in meta land is "~" and that /is/ 
> allowed for strings.
> 
> | template Foo(char[] str)
> | {
> |   const char[] Foo = \" ~ str ~ \"
> | }
> 
> what specific problems exist for non char arrays that don't exist for 
> char arrays?

According to Don, it's an accident that it works for strings. ;)  A 
happy accident, no doubt; but that explains why it doesn't work for 
anything else.

Dave



More information about the Digitalmars-d mailing list