CTFE question
Don Clugston
dac at nospam.com
Mon Sep 3 04:27:56 PDT 2012
On 28/08/12 19:40, Philippe Sigaud wrote:
> On Tue, Aug 28, 2012 at 2:07 PM, Chris Cain <clcain at uncg.edu> wrote:
>> On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote:
>>>
>>> Ahhh I understand...
>>>
>>> As a follow up, is it then possible to 'track' filling a
>>> large enum / immutable on compile time by outputting a msg
>>> every for ?
>>>
>>> I'm generating rotation matrices for yaw, pitch and roll
>>> at compile time which can take a long time depending on
>>> how fine grained I create them.
>>
>>
>> I'm pretty sure there isn't. However, if you're just trying to develop/test
>> your algorithm, you could write a program that runs it as a normal function
>> (and just use writeln) as you develop it. After it's done, you remove the
>> writelns, mark the function as pure and it should work exactly the same in
>> CTFE.
>
> Godd adivce, except beware of using ++ and --, they don't work at
> compile-time. I'm regularly caught unaware by this, particularly while
> looping.
Really? That's scary. Is there a bug report for this?
More information about the Digitalmars-d-learn
mailing list