36 Commits

Author SHA1 Message Date
Lukas Hübner
d1fcec807b Fix some typos (spelling) 2023-06-14 20:18:40 -07:00
Khem Raj
f3e31f32f7 sandbox: Do not use int8_t in std::uniform_int_distribution
Newer versions of libc++ has dropped supporting this usecase since its
an UB see.

https://reviews.llvm.org/D114920?id=400571

Fixes

uniform_int_distribution.h:162:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_inttype<char>::value': IntType must be a supported integer type
    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/git/sandbox/performance.cpp:261:9: note: in instantiation of template class 'std::uniform_int_distribution<char>' requested here
    c = std::uniform_int_distribution<char>(' ', '~')(gen);
        ^
/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/git/sandbox/performance.cpp:261:9: error: type 'std::uniform_int_distribution<char>' does not provide a call operator
    c = std::uniform_int_distribution<char>(' ', '~')(gen);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-04-23 20:09:18 -07:00
Shane Grant
8291f44e05 Update license to match BSD template 2022-01-09 17:05:35 -08:00
Claus Klein
48fda3f0a6
cleanup cmake files to be a little more moderen (#659)
* cleanup cmake files to be a little more moderen

keep the source tree free of build artifacts
cmakelint the cmake files too

* fix cmake setup errors on CI

fix APPLE clang builds too

* CI needs support for realy history cmake V3.6

fix typo in cmake files using add_test() commnds

* One step more to use modern cmake

Prevent to modifiy compile and linker FLAGS and to set global includes
pathes

* fix CI build problems with older cmake versions

prepare cleanup cmake list file

* final cleanup

use Config.cmake.in and install hole cmake config files

* Fix cpp17 PORTABILITY_TEST linker problem

add missed target_link_libraries()

* hopefully prevent windows test problems
2020-11-17 12:50:06 -08:00
Shane Grant
1bce4362db Add option to disable performance test build 2019-10-23 22:06:18 -07:00
Shane Grant
4b466f4f80 clang warning updates for sandbox code 2019-10-23 22:06:18 -07:00
Tushar Maheshwari
0a908bc8c8 Make tests pass with Windows 2017-01-26 14:16:28 +05:30
Shane Grant
75e50ee1e6 remove old code from sandbox relates #363 2016-11-28 13:48:46 -08:00
Shane Grant
e63f08f4d7 minor adjustments to casts, see comments on #363 2016-11-28 11:47:24 -08:00
Kasper Laudrup
9376ca6055 Don't use C style casts
Change C style casts to C++ static casts.

This makes the code compile with the -Wold-style-cast warning enabled
2016-11-23 01:34:53 +01: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
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
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
f9f7ac0943 Remove boost include and unused sandbox
Should be no problem compiling when boost isn't found #162
2015-01-23 11:47:04 -08:00
Shane Grant
1e4398c5b2 adding missing cmake file 2015-01-17 11:40:15 -08:00
Shane Grant
6e41ed80b8 Merge branch 'issues_113_137' into develop
Conflicts:
	include/cereal/details/helpers.hpp
2015-01-17 00:45:25 -08:00
Shane Grant
419343a0c5 Fix unused var warning for static vars, add cmake rules for shared lib sandbox 2015-01-17 00:36:36 -08:00
Shane Grant
c2f881de5b reorganize sandbox_vs 2015-01-16 22:48:21 -08:00
Mikhail Kremnyov
00f47ed3b9 CEREAL_REGISTER_TYPE can now be called multiple times for the same type
Conflicts:
	include/cereal/cereal.hpp
	include/cereal/details/polymorphic_impl.hpp
2015-01-15 15:27:58 -08:00
Shane Grant
0626809bac update vs sandbox 2015-01-14 23:05:41 -08:00
Shane Grant
330e53f3a1 Merge branch 'erichkeane-XmlFix' into develop
Conflicts:
	include/cereal/archives/xml.hpp
2015-01-09 20:15:28 -08:00
Shane Grant
f4290726af Adding some types to XML in sandbox 2015-01-09 20:14:32 -08:00
Shane Grant
27ce5592f3 progress on #113
still not working properly - StaticObject will correctly be initialized but then we'll end up with more than one of them (one in DLL one in app)
2014-11-09 16:48:13 -08: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
Shane Grant
9a5a7134db Temporary fix for #105 2014-08-18 23:15:29 -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
d1310e4459 Working on vs2013
see #23
2014-03-20 20:43:35 -07:00
Shane Grant
26d31872e3 Update copyright 2013 -> 2014 2014-03-20 20:36:04 -07:00
Shane Grant
5116ced7ba progress on load type traits
see #23
2014-03-16 17:39:27 -07:00
Shane Grant
953090e645 Progress on traits for #23
Re-made a repo based on a more recent version of develop.
Syntax for save_minimal looking good so far.
2014-03-15 17:27:51 -07:00
Shane Grant
ab5a89a16f Fixing support for several numeric types in JSON
longs should now properly serialize under 32 or 64 bit machines.

long long, unsigned long long, and long double now serialize as base10
strings instead of base64.

see issue #72
2014-03-14 23:31:25 -07:00
Shane Grant
8acd3dc767 Fixes related to changes for #64 2014-03-13 22:33:45 -07:00
Shane Grant
c8b6e2444a Merge branch 'new_options' into develop 2014-03-13 22:30:10 -07:00
Shane Grant
b7fd587b9e Befriending cereal::access now works with construct
see #73
2014-03-12 17:01:22 -07:00
Shane Grant
a9d711060b Adding doc target 2014-03-11 17:02:36 -07:00
Randolph Voorhies
9bd06b6118 Adding portability test 2014-03-11 16:28:37 -07:00