Random D geekout

Dmitry Olshansky dmitry.olsh at gmail.com
Sat Apr 21 04:12:05 PDT 2012


On 21.04.2012 14:48, SomeDude wrote:
> On Saturday, 21 April 2012 at 10:21:49 UTC, Dmitry Olshansky wrote:
>> Just stop using ctRegex for now... it's experimental.
>>
>> Or more to the point the problem is this. I've seen this one on bugzilla:
>>
>> version(CtRgx) {
>> enum Re = ctRegex!re;//auto is OK here BTW
>> } else {//that's the problem. It's _parsed_ at compile-time
>> static Re = regex(re);//switch static to auto
>> }
>> }
>>
>> And there is little I can do untill CTFE stops bleeding RAM.
>
> Well, neither of those works:
>
> version(CtRgx) {
> auto Re = ctRegex!re;//auto is OK here BTW
> } else {//that's the problem. It's _parsed_ at compile-time
> auto Re = regex(re);//switch static to auto
> }
>
>

Probably there are other cases where compiler const folds stuff I dunno.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list