need help with CTFE
Dmitri Makarov via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Mar 26 10:49:40 PDT 2015
On Thursday, 26 March 2015 at 17:30:40 UTC, anonymous wrote:
> value parameter. You cannot do that, because `name` is a
> "dynamic value" but you can only pass a "static value" there.
> (There may be better terms than dynamic/static value.)
Thank you, anonymous. It makes sense. I guess rather than
"static/dynamic", I would think of "known/unknown at
compile-time". In this case, 'if (name == "hammer")' seems no
more static or less dynamic than 'hasMember!(Tool, name)'.
Nevertheless, I appreciate your help and will use the solution
that you offered.
More information about the Digitalmars-d-learn
mailing list