806 Commits

Author SHA1 Message Date
Shane Grant
5a906d1c41 add inline specifier to function 2015-12-25 17:53:08 -08:00
Shane Grant
33e421cb32 Cleanup on documentation/some other small things
relates #188
2015-12-25 17:51:02 -08:00
Shane Grant
3f055ae24c Working on MSVC2013
-removed some debug messages
-spruced up some documentation
-modified main.cpp for MSVC tests to properly compile given previously made changes in common.hpp
relates issue #188
2015-12-23 22:54:35 -08:00
Shane Grant
37380fa6ff First pass at inline doc for new polymorphic casting
Also some changes to make sandbox things work with the new casting

Made it so base_class doesn't need to know about polymorphism to work

All relates to #188
2015-12-22 23:39:25 -08:00
Shane Grant
480de61173 make clang happy with integer comparisons 2015-12-22 22:30:30 -08:00
Shane Grant
ba561c067f Merge pull request #240 from kersson/json_minimal_msvc2013
Additional MSVC JSON minimal fixes
2015-12-22 14:56:39 -08:00
Shane Grant
e9a71acb07 Merge branch 'BigSeb-develop' into develop
resolves #244
2015-12-22 14:52:24 -08:00
Shane Grant
ecb44372e5 grammar fix 2015-12-22 14:52:02 -08:00
Shane Grant
61429d2292 Merge branch 'develop' of https://github.com/BigSeb/cereal into BigSeb-develop 2015-12-22 14:44:37 -08:00
Shane Grant
7a3933ff0f Wrapping up external code in cereal namespace
Covers base64 and rapidxml, still need to do json
see #121
2015-12-22 14:26:14 -08:00
Shane Grant
1d50761ece Boost test related fix, fix unit test in response to #188 2015-12-21 23:21:11 -08:00
Shane Grant
bdd766d474 Adding unit tests for polymorphic casting
Added support for up and downcasting for polymorphism, see issue #188

Still needs final documentation + cleanup
2015-12-20 18:15:29 -08:00
Shane Grant
5008bddcb9 initial progress towards #188, fixed in the save direction
Needs to be done in load direction + unit tests + attribution + cleanup
2015-12-19 12:07:26 -08:00
Sébastien Matte
de1011152e Fixed an issue with the preservation of whitespaces for strings. The validation may be invalid when one of the previous calls to the saveValue was done and the value was taking more characters. A test is now added in order to reproduce this error. 2015-11-06 00:24:17 -05:00
Krishna Ersson
3184b468bc Additional MSVC JSON minimal fixes
The fixes in f451090 still did not solve USCiLab/cereal#217.
Changed the SFINAE logic to use EnableIf with AND conjunctions via the variadic arguments.
2015-10-08 17:11:18 -04:00
Tamas Kenez
f2ccfea1f8 cmake: don't overwrite CMAKE_CXX_STANDARD if it's already higher 2015-10-07 11:02:34 +02:00
Tamas Kenez
cd7346ff3d cmake improvements (install target)
- add install target to install config-module for
  which creates an INTERFACE library
- add unittest to test config-module
- add option to skip tests and install only
- fix MSVC compatibility problem in CMakeLists.txt
2015-10-06 14:32:40 +02:00
Shane Grant
1479f8e635 XML getNodeName working as intended now
Fixes #235
2015-09-24 21:17:49 -07:00
Matt Clarkson
2c0451d647 Support root arrays in JSONInput
If a root array '[13, 14, 15]' is given to the JSONInput it will fail to
parse it because it is expecting an object. Root arrays are conformable to
the old JSON specification that the version of RapidJSON cereal uses
implements
2015-09-22 15:03:24 +01:00
Matt Clarkson
608d48d7b8 Fix whitespace alignment 2015-09-17 15:15:31 +01:00
Matt Clarkson
8fefa0cd77 Allow serialization of nullptr
This allows 'null' to be written to JSON archives
2015-09-17 15:15:13 +01:00
Matt Clarkson
f54f9e89fd Correct whitespace error 2015-09-11 14:45:47 +01:00
Shane Grant
0ff685ce4d Merge pull request #220 from berenm/patch-1
Add inline specifiers to make_size_tag, prologue and epilogue
2015-09-09 22:47:17 -07:00
Shane Grant
f45109083f MSVC JSON minimal fixes
MSVC 2013 couldn't handle the boolean expression used in some SFINAE tests - was treating a three-way OR with one true value as false.  This fixes #217
2015-09-09 22:25:15 -07:00
Matt Clarkson
6da711b843 Allow JSON output node to finish arrays
It is possible that a node might want to serialize as an Array at the
top level. This patch closes out the array if that is the situation.
2015-09-04 10:13:40 +01:00
Matt Clarkson
23053232d4 Resolve whitespace error 2015-09-04 10:13:24 +01:00
Kyle Fleming
99d8f0a77d Barebones boost::variant unit test 2015-09-03 17:15:06 -07:00
Kyle Fleming
df33ae5c4d Fix boost::variant compile error with clang 3.5.0
boost::variant<int> variant(10);
cereal::JSONOutputArchive oarchive(std::cout);
cereal::save(oarchive, variant);

note: candidate template ignored: substitution failure [with Archive = cereal::JSONOutputArchive, VariantTypes = <>]: too few template arguments for class template 'variant'
  void save( Archive & ar, boost::variant<VariantTypes...> const & variant )

see: https://llvm.org/bugs/show_bug.cgi?id=20890#c1
2015-09-03 17:10:32 -07:00
Beren Minor
447bdc7399 Add inline specifiers to make_size_tag, prologue and epilogue
It looks like that MSVC doesn't want to inline make_size_tag, and it has an impact on performance. I haven't seen the problem with prologue and epilogue functions. In anyways, just for the sake of consistency with other wrappers, inline looks sensible here.
2015-08-20 16:34:40 +02:00
Shane Grant
b849a39950 Merge branch 'abutcher-gh-generalize-map-serializer' into develop
see #205
2015-07-17 10:47:13 -07:00
Shane Grant
db6aaffb69 Comment level doc for #205 2015-07-17 10:46:33 -07:00
Adam Butcher
d350c81947 concepts/pair_associative_container.hpp: Have inclusion guard reflect location. 2015-07-17 09:18:41 +01:00
Adam Butcher
207c085a26 Added cereal/concepts/pair_associative_container.hpp and restored std includes in cereal/types/{unordered_map,map}.hpp 2015-07-17 09:13:23 +01:00
Adam Butcher
84e2f8edda Generalize cereal/types/map.hpp to deal with arbitrary pair associative containers having mapped_type. 2015-07-14 10:49:08 +01:00
Shane Grant
69fbcb556f Merge pull request #199 from ph03/develop
Fix shared_ptr custom deleter
2015-06-23 11:30:12 -07:00
Janick Martinez Esturo
f3d7206bb2 Fix shared_ptr costum deleter
Correctly prevent calling destructor on unitialized data
2015-06-16 01:41:56 +01:00
Shane Grant
2f9471bc40 Merge branch 'develop' for release 1.1.2 v1.1.2 2015-06-08 11:13:21 -07:00
Shane Grant
774fe618cb tested working on vs 2015-05-02 23:19:39 -07:00
Shane Grant
676ebf76fa more tab spacing fixes 2015-05-02 21:53:30 -07:00
Shane Grant
4b1b70b302 tab spacing style fix 2015-05-02 21:52:44 -07:00
Shane Grant
7ae8d0dda4 Adds support for std::valarray
Merge branch 'ilerik-std.valarray.support.implementation' into develop
see #184
2015-05-02 21:50:02 -07:00
Shane Grant
15d4e9f10e style changes 2015-05-02 21:49:39 -07:00
Shane Grant
839ae30cc0 style changes 2015-05-02 21:41:43 -07:00
Shane Grant
7e1d32f1d5 Merge branch 'std.valarray.support.implementation' of https://github.com/ilerik/cereal into ilerik-std.valarray.support.implementation 2015-05-02 21:30:25 -07:00
Shane Grant
5d541d33cd JSON now matches string length for out of order NVPs
Fixes #183, relates #168, #169
fix originally proposed by @felixzng
2015-05-02 21:17:44 -07:00
ilerik
005d628652 Added support for std::valarray.
1) Implemented std::valarray serialization (based on vector.hpp) in file valarray.hpp
2) Implemented unit tests in file valarray.cpp (based on vector.cpp tests, except for bool case)
3) vs2013/unittests project configuration updated accordingly
4) unittests/common.hpp updated.
5) No documentation so far
2015-04-18 17:50:59 +03:00
Shane Grant
a248e3a55d Merge branch 'develop' for 1.1.1 release 2015-04-06 10:24:39 -07:00
Shane Grant
94d49c42ac is_in/out_serializable is now aware of specialization
count_in/out_serializers will now count the number of specializations if a type is
specialized, otherwise it will count the number of non-specialized serialization functions.

as a result of this, is_output/input_serializable now works as you would expect from the name
and will return true for correctly configured specialized types too.

this caused some logic changes to need to happen in cereal.hpp, mostly within the PROCESS_IF macro.

added some tests related to this change and #180

fixes #180
v1.1.1
2015-04-04 18:19:22 -07:00
Shane Grant
b385b3958a Empty string fixes with XML serialization
Fixes #182
2015-04-04 15:09:23 -07:00
Shane Grant
aad1e371c7 Merge branch 'develop' of github.com:USCiLab/cereal into develop 2015-03-29 00:36:28 -07:00