Why this code can't take advantage from CTFE?

Andrea Fontana via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 5 01:58:44 PST 2016


On Friday, 5 February 2016 at 09:49:38 UTC, Luis wrote:
> Reading/parsing a JSON or a XML using std.json / std.xml could 
> be done on CTFE ?

parseJSON() from std.json doesn't work with CTFE.

But I can build objects with with my code that works over 
std.json.
So if you convert (with mixins)

{ "hello" : "world" }
to
JSOB("hello", "world)

You can parse it ar compile time. :)


More information about the Digitalmars-d-learn mailing list