On Wed, 27 Mar 2013 23:43:07 +0400 Dmitry Olshansky <[email protected]> wrote:
> 27-Mar-2013 23:14, Peter Alexander пишет: > > On Wednesday, 27 March 2013 at 14:48:32 UTC, Andrei Alexandrescu > > wrote: > >> Found this: > >> http://stackoverflow.com/questions/15652718/object-error-access-violation-when-printing-result-of-std-algorithm-cartesianpr > >> > >> > >> Soon we'll need to clearly define the limits of CTFE, and what > >> happens when it fails. > > > > Aren't the limits just Safe D? (i.e. if it's in Safe D, it compiles, > > anything more is implementation defined?) > > No - one can call writeln (if one day it's marked @trusted). CTFE can > never do such a thing. There's (thankfully) already a ctfeWriteln (or something like that). So about all that needs to happen for writeln to work in CTFE is for it to start with: if(__ctfe) { ctfeWriteln(...); return; } Or something like that. > Plus no access to globals etc. in general > sense no side effects. >
