480 Commits

Author SHA1 Message Date
Shane Grant
1e5e648918 nan support following #300 (see #285) 2016-08-05 13:48:53 -07:00
Shane Grant
0bfa9adf27 Update rapidjson to ab791ae
relates #300
2016-08-05 11:21:42 -07:00
Shane Grant
f053576858 Add CEREAL_NOEXCEPT to destructors for gcc 4.7.3
see #311
2016-07-29 15:01:50 -07:00
Shane Grant
fb7fd75954 Changes to support thread safety
-Make CEREAL_THREAD_SAFE be 0 or 1 instead of present or not present
-Move CEREAL_NOEXCEPT to macros.hpp
-instead of individual locks, can now use StaticObject::lock() to request a lock if CEREAL_THREAD_SAFE is enabled. If
not enabled, this call returns an empty object. The lock returned acts just like std::lock_guard, but uses
std::unique_lock internally
-Made a bunch of requests to StaticObject::getInstance const
-Added first stab at multithreaded tests with versioning and polymorphism
2016-07-29 13:40:49 -07:00
Christopher Bläsius
869a132f1b missing reference 2016-07-28 12:26:35 +02:00
Christopher Bläsius
39d1b45dfc yet another missing #ifdef 2016-07-28 12:19:32 +02:00
Christopher Bläsius
d7f96ac80e missing #ifdefs 2016-07-28 12:15:31 +02:00
Christopher Bläsius
73b2f8b1ec add new compile option "THREAD_SAFE" for enabling mutex locks on static objects 2016-07-28 11:49:10 +02:00
Shane Grant
a8bd7f3368 cleanup related to #291 2016-06-29 12:37:35 -07:00
Shane Grant
6d8bdd8818 Split lookup and exists check in PolymorphicCasters into two functions.
Fixes a bug related to lookup, see #291

Also changed from bool to uint8_t for #306

Updated gitignore for MSVC junk
2016-06-29 12:32:02 -07:00
Shane Grant
ac07952e40 add string include to bitset
see #302
2016-06-16 12:24:28 -07:00
Shane Grant
74da9b6b2a change bool to uint8_t see #298 2016-06-13 14:16:01 -07:00
Shane Grant
c330000cb4 Fix problems with portable_binary for BinaryData
see #298
2016-06-13 11:28:18 -07:00
Shane Grant
4379729f78 remove undef on CEREAL_STATIC_CONSTEXPR 2016-06-12 14:07:37 -07:00
Shane Grant
62c92138a2 correctly undef STATIC_CONSTEXPR 2016-06-12 13:54:03 -07:00
Shane Grant
3bc3c2adb0 rename ALIGNOF to CEREAL_ALIGNOF 2016-06-12 13:49:49 -07:00
Shane Grant
a1e259ed84 Use /W4 in all but performance.
Ignore VS warning 4127 for assert(false) in RapidJSON
2016-06-12 13:45:48 -07:00
Shane Grant
8401da04af rename NOEXCEPT to CEREAL_NOEXCEPT
-apply MSVC related changes to #297
2016-06-07 14:19:02 -07:00
reuk
8559c68b1b added virtual destructor to PolymorphicCaster 2016-06-06 12:50:44 +01:00
Shane Grant
037cf4fe94 Fix no return val error, add MSVC2015 builds 2016-05-30 17:37:40 -07:00
Shane Grant
a95551b0ac fix spacing 2016-05-30 17:12:28 -07:00
Shane Grant
db6586e93a alignas and noexcept workarounds for MSVC2013
see #290, #279
2016-05-30 17:10:45 -07:00
Shane Grant
77e1e0be74 fix shadowing error 2016-05-18 11:23:07 -07:00
Shane Grant
1e64528310 Merge branch 'json-double-roundtrip' of https://github.com/m7thon/cereal into m7thon-json-double-roundtrip 2016-05-18 11:17:29 -07:00
Shane Grant
2a0e67a780 formatting, remove copy ctors 2016-05-18 11:15:33 -07:00
reuk
974bbc28f1 default virtual destructors and other class ops for ArchiveBase classes 2016-05-18 17:05:26 +01:00
Michael Thon
e5911ad79e rapidjson: add ability to write and parse nan/inf/-inf 2016-05-17 14:03:41 +02:00
Michael Thon
e79526ce13 json.hpp: write and parse double in full precision 2016-05-17 14:01:33 +02:00
Shane Grant
2f1725a79d Made it OK to use shared_from_this in load_and_construct
Resolves #283

Previously EnableSharedStateHelper restored the internal weak_ptr for
enable_shared_from_this after load_and_construct was called, it is now
called as soon as construct() is called, allowing a user to use shared_from_this
to initialize various member variables. See issue for more info.
2016-04-30 22:04:42 -07:00
Shane Grant
fe37e5f9c9 remove cout debug
relates #281
2016-04-29 16:42:02 -07:00
Shane Grant
aaf1ef185e Implicitly build intermediate relations for polymorphism
relates to #281

Now if someone has a hierarchy like A -> B -> C,
the A->C relation will be automatically created if A->B and B->C already exist.
This is implemented by a chain of casts to get down the inheritance.

In the case of multiple paths, the shortest one will be chosen.
2016-04-29 16:39:31 -07:00
Shane Grant
677e7e6c8e Updates RapidJSON to 1.0.2, nests in namespace
Updated and made changes necessary for the new version of rapidjson.
Looks good on ubuntu under the compilers I can test with, needs MSVC testing.
We had some internal changes to rapidjson but these didn't seem necessary with
the new version. Haven't done any performance testing, initial estimates put it at
nearly the same speed for json serialization. Could probably optimize things.

relates #82, #121
2016-04-19 10:55:56 -07:00
Shane Grant
4fdc15ed82 remove extra linebreak 2016-03-30 11:35:19 -07:00
Shane Grant
d2bfaa93f0 Support for versioning in load_and_construct
see #216 tests to follow
2016-03-30 11:17:22 -07:00
Tomasz Dudziak
10b967c74b Fix memory leak due to alloc-free size mismatch
sizeof(aligned_storage<sizeof(T)>::type) might not be equal to sizeof(T) for
some types.
2016-03-08 15:46:55 +01:00
Shane Grant
8db68d25bd Use __VA_ARGS__ in register macros
See #141

Should work across all compilers we currently support, for any other
times when templated types are needed in a macro, just unroll the macro
manually and replace as necessary
2016-03-01 14:52:32 -08:00
Shane Grant
61c8e148f6 Merge branch 'arm_fixes' of https://github.com/kallehuttunen/cereal into kallehuttunen-arm_fixes 2016-03-01 14:33:14 -08:00
Shane Grant
7ea8da1a27 update copyright date and remove extra include 2016-03-01 14:31:17 -08:00
Shane Grant
08891efaa9 Add empty serialization func for std::less
-Resolves issues with compiling priority_queue (#264)
-Removed std::less serialization from testing common file
2016-03-01 14:30:02 -08:00
Shane Grant
404f3597ff Merge branch 'vcatechnology-json' into develop
see #229
2016-02-05 13:55:55 -08:00
Shane Grant
c5a47be1e3 more documentation for #201 2016-02-05 10:46:38 -08:00
Shane Grant
aaed50c767 Changing directories for concepts
relates #205
2016-02-05 10:24:22 -08:00
Shane Grant
e9d33b0a1f BinaryData optimization for Bitset
Integrates the changes proposed by #236

Bitset will now use a chunking method when serializing to BinaryData
capable archives, which should be faster, especially for larger bitsets.

Archives that do not support BinaryData will continue to use the old method.

Also added a larger bitset to the test case
2016-02-05 10:14:44 -08:00
Shane Grant
6c1b3f7602 Add desired NVP name to NVP not found error for json/xml
see #226
2016-01-27 15:48:21 -08:00
Shane Grant
7f3e3b59b1 Merge pull request #228 from kylefleming/fix_boost_variant
Fix boost::variant compile error with clang 3.5.0/3.6.0
2016-01-27 15:02:27 -08:00
Kalle Huttunen
977062eeb1 Fix ambiguous function template overload in json.hpp
There are already the "small signed/unsigned overloads" of loadValue that
are always selected for integers smaller than 64 bits.

The fixed overloads conflicted with the "small signed/unsigned overloads"
if:

- long is smaller than 64 bits
- int32_t is not typedef for long
2016-01-22 10:13:52 +02:00
Kalle Huttunen
742a585626 Account for possibility of char being unsigned by default in xml.hpp
This is the case for example in ARM based platforms.
2016-01-22 10:03:31 +02:00
Shane Grant
20778fe4b8 Finish up endian support for portable binary
-added more tests
-should resolve #115
2015-12-27 23:21:59 -08:00
Shane Grant
33556de79f include <polymorphic> by default for <memory>
relates #193
2015-12-25 18:11:25 -08:00
Shane Grant
05afe09737 Merge branch 'issue_188' into develop
resolves #188

still need to update website doc
2015-12-25 18:02:20 -08:00