Thread overview | |||||
---|---|---|---|---|---|
|
June 01, 2007 Limitations in CTFE? | ||||
---|---|---|---|---|
| ||||
I'm sure this has been discussed numerous times before, but I couldn't find it in the first ten pages of a newsgroup search, so here goes: What are the requirements for a function to be executed at compile-time? I understand... * no heap allocation/object instantiation * no casting * no side effects * no shared memory access/state beyond the scope of the function * no synchronization/multithreading * no pointer/reference usage * no out/ref parmeters Am I right about this? Anthing else? |
June 01, 2007 Re: Limitations in CTFE? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Fraser | Robert Fraser wrote: > I'm sure this has been discussed numerous times before, but I couldn't find it in the first ten pages of a newsgroup search, so here goes: > > What are the requirements for a function to be executed at compile-time? > Try the documentation, too: http://www.digitalmars.com/d/function.html -- Remove ".doesnotlike.spam" from the mail address. |
June 02, 2007 Re: Limitations in CTFE? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Deewiant | Heh; sorry; should've checked there again. I read that a long time ago and didn't think that it might have changed. Thanks!
Deewiant Wrote:
> Robert Fraser wrote:
> > I'm sure this has been discussed numerous times before, but I couldn't find it in the first ten pages of a newsgroup search, so here goes:
> >
> > What are the requirements for a function to be executed at compile-time?
> >
>
> Try the documentation, too: http://www.digitalmars.com/d/function.html
>
> --
> Remove ".doesnotlike.spam" from the mail address.
|
Copyright © 1999-2021 by the D Language Foundation