On Thu, Nov 14, 2013 at 5:02 PM, bearophile <bearophileh...@lycos.com>wrote:

> Ali Çehreli:
>
>
>  > When is an enum *better* than a normal (static
>> const/immutable) constant?
>>
>> Good question. :)
>>
>
> When you can or want to compute something at compile-time, when you need
> values to feed to templates, etc.
>
>
but you can *can* do that with static const /const/immutable variables too:

auto fun2(int a)(int b){...}
immutable a=fun(2);//static const /const/immutable/enum
auto b=fun2!a(3);

Reply via email to