939 Commits

Author SHA1 Message Date
Caspar Kielwein
a06680868e Add cereal.doxytags as tagfile to allow external projects to link to cereal documentation. 2016-10-02 16:09:04 +02:00
Caspar Kielwein
3fb59dbe6c Build doxygen documentation with separate CMakeLists.
Extracted CMakelists.txt to doc subdirectory.
Changed paths in doxyfile.in and CMakeLists accordingly.
added doc as subdirectory in main CMakeLists.txt.
2016-10-02 15:53:28 +02:00
KKlouzal
3d5a77d2c3 Fixed Internal Cereal Includes 2016-09-20 23:29:05 -07:00
Igor
adea360c7a Use statics initialization on demand fixed #331
Fixed crash CEREAL_THREAD_SAFE=1 with polymorphic class. Crash happened because StaticObject<T>::instanceMutex not initialized when StaticObject<T>::lock() called for the first time. Basically it is better to use static vars inside static functions to have predefined order of construction like it is done in StaticObject<T>::getInstance(), which calls create and forces instantiation at pre-execution time.
Also in this commit removed static T &instance; since it is possible that there were be two instances created
1) template <class T> T & StaticObject<T>::instance = StaticObject<T>::create();
2) inside StaticObject<T>::create()
2016-09-16 20:18:49 +03:00
Christoph Junghans
b8d9acc502 cmake: allow dropping -Werror from c++ flags 2016-09-07 15:57:57 -06:00
Erich Keane
b9c424e06a Avoid accidentally using the "check" macro on OSX
Fix for #341, #273, and #104.  Replace usages of "check(" with
"(check)(", which will prevent us from colliding with the macro defined
in OSX's Assert macros.
2016-09-07 11:55:28 -07:00
dlardi
c83a7f99e6 'auto const &' used for range-based loops 2016-09-01 18:41:15 +03:00
dlardi
cd37b64b78 Iterative searching of chainable relations added 2016-08-30 15:12:37 +03:00
dlardi
d16f88da40 Register of chainable relations fix 2016-08-25 16:12:41 +03:00
Shane Grant
bd839ccb47 Merge branch 'develop' for 1.2.1 v1.2.1 2016-08-10 11:50:19 -07:00
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
6ff90841a5 Merge branch 'ChrisBFX-issue_315' into develop
see #315
2016-07-29 13:46:44 -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
eb5f8fb4cd cmake option if statement 2016-07-28 12:24:06 +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
42a45b6e15 Merge branch 'develop' for 1.2 release v1.2.0 2016-06-30 14:39:31 -07:00
Shane Grant
58d244edb7 fix uninit valgrind error for base ctor in diamond inheritance 2016-06-30 14:38:54 -07:00
Shane Grant
0645af74f9 Merge branch 'develop' for release 1.2 2016-06-30 13:34:55 -07: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
0235975d89 Merge branch 'm7thon-json-double-roundtrip' into develop 2016-05-18 11:23:37 -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
f73c95b604 Merge branch 'reuk-develop' into develop 2016-05-18 11:16:03 -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
Francesco Biscani
7409da1fb4 Implementation and testing of std::atomic serialization. 2016-04-23 01:25:55 +02: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