Is it possible in D to find out if the parameter given to a
function is a literal or a compile time constant?
Of course, if it has _only_ parameters known at compile time, the
function will be executed during CTFE, so I can check for the
execution time. But if it has also runtime-parameters, it will
only be executed during runtime. Is it still possible to find
out, which values are known at compile-time?
They should be immutable, but do they have some other, more
specific property?
- identify literals Dom DiSc via Digitalmars-d-learn
-