Using "cast(enum)" for explicit request of ctfe

monarch_dodra monarchdodra at gmail.com
Wed Dec 4 05:13:55 PST 2013


On Wednesday, 4 December 2013 at 11:54:08 UTC, luka8088 wrote:
> On 4.12.2013. 12:41, monarch_dodra wrote:
>> On Wednesday, 4 December 2013 at 11:32:40 UTC, Jakob Ovrum 
>> wrote:
>>> On Wednesday, 4 December 2013 at 11:12:54 UTC, monarch_dodra 
>>> wrote:
>>>> Or, if somebody has an idea of how to do this via a library 
>>>> solution?
>>>
>>> alias eval(alias exp) = exp;
>> 
>> Nice :D
>> 
>> Very very nice. Though that should be "enum" I think.
>> 
>> I think having this somewhere in Phobos would be a great 
>> addition.
>> 
>> Not sure "eval" would be correct though, as "eval" tends to 
>> imply parsing.
>> 
>> I'll just file a simple ER then. Where would we put such an 
>> addition?
>
> Eval comes from examples of 
> http://dlang.org/function.html#interpretation

Alright, then eval is fine.


More information about the Digitalmars-d mailing list