95 Commits

Author SHA1 Message Date
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
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
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
Shane Grant
14bc429d9a Various fixes for warning level 4 with MSVC
closes #178
relates #151
2015-03-29 00:35:34 -07:00
Shane Grant
0d8cebe6f3 Add unit tests for size 11 tuple, re: #175 2015-03-04 15:24:11 -08:00
Shane Grant
418271f219 Marking adapters as FUTURE_EXPERIMENTAL
see notes in #46
2015-01-16 15:42:10 -08:00
Shane Grant
dfa871d5d8 Added test to VS build, related fixes
Relates to #46, passing on VS now
2014-10-05 18:01:12 -07:00
Shane Grant
e054ec1b10 Merge branch 'issue_46' into develop relates #46 2014-10-04 19:15:05 -07:00
Shane Grant
901489593f finish unit test for #46 2014-10-04 19:02:35 -07:00
Shane Grant
5715d7ad01 Clean up UserDataAdapter
Wrapped dynamic_cast in a cereal exception,
made the rtti function private,
updated test case to expect failure on some cases
2014-10-03 14:39:21 -07:00
Shane Grant
851e72bd1a Some ideas on solving adapters
This is a solution for #46 that uses RTTI to allow get_user_data to work
and throw an error when used in an archive that doesn't actually have user
data.  Unfortunately this is a run-time check and uses a dummy virtual function
that is never actually called (so the overhead of this will be very low, a few bytes
for the vtable, no runtime cost).

Another solution I'm going to play around with involves re-arranging some templates and
typedefs.
2014-09-26 21:59:18 -07:00
Randolph Voorhies
28f9841fdb Fixing issues with icc. refs #120
In sandbox_vs.cpp, there is a very strange issue with calling
traits::is_input_serializable that causes icc 15.0.0 to crash.
Everything else works great though.
2014-09-02 11:49:47 -07:00
Randolph Voorhies
652e9b7f34 Fixed issue with private c'tors
This fixes an issue where we were not properly using cereal::access to
default construct classes.

This closes issue #119.
2014-08-26 11:45:38 -07:00
Shane Grant
2e1737ec1f Uncomment test for issue #116 2014-08-22 13:23:44 -07:00
Shane Grant
13b0c7edb5 Support for char in XML archive
-Added unit tests for char in pod
-XML archive should properly deserialize chars vs int8_t types now
see #116

still needs to be tested on VS and g49
2014-08-21 23:43:52 -07:00
Shane Grant
ba63d4a093 Merge branch 'volo-zyko-master' into issue_109 2014-08-18 17:10:25 -07:00
Volo Zyko
f8a871c7ff Another attempt to fix issue #109 now for any type that can contain whitespaces 2014-08-18 14:57:07 +03:00
Björn Esser
869b2b2cda add CMake-option 'SKIP_PORTABILITY_TEST' 2014-08-05 19:43:15 +02:00
Volo Zyko
16bf75dedf Extended the fix for issue #109 and added a test. 2014-07-31 15:45:05 +03:00
Shane Grant
ea007dafd8 Adding additional tests to cover issue #79 2014-06-06 15:24:24 -07:00
Shane Grant
f067ba6905 Fixing issue #79
Added a set of trait classes that can be used to get an input archive
from an output archive.  Requires specializing a struct for each direction or
alternatively using the new macro CEREAL_SETUP_ARCHIVE_TRAITS(InArchive, OutArchive).
This has already been added for all built in archive types.  This is currently only
used for minimal serialization.

load_minimal type traits now correctly use the output archive to check the existence of
a corresponding save_minimal and get its return type, using the new get_input_from_output
type class.

Added a test for this case into the minimal structs test.

Sandbox_vs needed the new macro to become compliant.
2014-05-22 10:59:13 -07:00
Shane Grant
8785741f41 Progress towards #46 2014-05-19 16:15:16 -07:00
Shane Grant
d85d8136e1 Fixing versioning for classes in namespaces
Fixes #99
2014-05-12 10:22:38 -07:00
Shane Grant
83abae0906 fix cmake files, accidentally removed quotes from earlier commit 2014-04-15 12:07:24 -07:00
Shane Grant
b2730c6351 Fixing merge problem 2014-04-15 11:59:41 -07:00
Shane Grant
6824a6f46f Adding quotes to cmake stuff
Also made it so that performance actually gets built

see #84
2014-03-28 14:24:28 -07:00
Shane Grant
5d31ec2ee1 updating coverage scripts and build 2014-03-20 22:20:42 -07:00
Shane Grant
26d31872e3 Update copyright 2013 -> 2014 2014-03-20 20:36:04 -07:00
Shane Grant
60e207faaa Adding unit tests for #23 (minimal) 2014-03-20 14:37:14 -07:00
Shane Grant
348d2d763d Updating unit tests to include minimal specializations 2014-03-20 14:18:56 -07:00
Shane Grant
dd6cf4c3cf Now emitting errors if mixing versioning on output serialization
If someone attempts to have both a versioned and non-versioned serialization
function, they will get a compile time error.

relates to improvements in #23
2014-03-15 21:21:02 -07:00
Shane Grant
5c87e68cb9 Increasing readability of static_assert on clang and other compilers that don't
actually print newlines
2014-03-15 19:36:59 -07:00
Shane Grant
22f0070a83 making versioned compatible with specialization
Also fixed a bug with some type traits that would erroneously return true if
an odd number of boolean variables were true when the desired behavior was to return
false if more than one boolean variable was true.

Need to revise the no matching serialization to properly fire if a type is specialized
but has both versioned and non-versioned functions of the specialization type.
2014-03-15 19:09:57 -07:00
Shane Grant
2225fcaf91 specialize_serialize now works with versioning
todo: load, save, and non member versions of them all
2014-03-15 18:24:40 -07:00
Shane Grant
33180eac14 doc update and fix minor bug with vector test 2014-03-14 00:20:41 -07:00
Shane Grant
2090646c47 Adding valgrind to travis 2014-03-13 12:18:19 -07:00
Shane Grant
afdeede5b0 adding tests related to issue #74 2014-03-12 16:23:08 -07:00
Shane Grant
98959ab40a Fixing MSVC unit testing for new format 2014-03-11 23:33:28 -07:00
Shane Grant
f6c311fb7c Adding license and moving boost include for MSVC 2014-03-11 23:12:07 -07:00
Shane Grant
5323a1dbaa uncommenting chrono test 2014-03-11 23:00:24 -07:00
Shane Grant
06255cef01 Adding 32-bit tests (not working for now) 2014-03-11 17:38:51 -07:00
Randolph Voorhies
9bd06b6118 Adding portability test 2014-03-11 16:28:37 -07:00
Randolph Voorhies
ba2ca7c94d Switching to CMake and splitting unittests 2014-03-11 14:50:04 -07:00