Thread overview
Limitations in CTFE?
Jun 01, 2007
Robert Fraser
Jun 01, 2007
Deewiant
Jun 02, 2007
Robert Fraser
June 01, 2007
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
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
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.