kazuho/picojson — pull request #56 by ChrisJefferson (2014-11-18 16:39:06+00:00)
Title: Caj/type traits gmp

My current progress on #51 . It isn't designed to be merged just yet, but I wanted to check the state before continuing.

There are minimal changes to picojson.h, mainly just tidying up some places where the type traits weren't used (refering to array and object), and some (in my opinion) slight neatening. In particular, there is no explicit reference to my header, which is nice.

The only thing which caused me trouble is that my type must be storable in a union, so must be a pointer. I added a pair of traits(return_type and to_return_type) which givea way of storing a pointer in the union (like object/array), or the raw object (like double already is).

I would like to be able to run all the tests for my interface, but that is proving irritatingly fiddly. One option would be to pull the tests out into a seperate file?

I could also look at abstracting out the int64 in a similar way, which would get all int64 out of picojson.h (at the cost of changing the current int64 interface, and making int64s a bit less efficient because of another layer. Depends how much / if at all you would like it out..)