when char is unsigned it's uint8_t which doesn't match the type declared
for the key of the map, so it fails with
error: non-constant-expression cannot be narrowed from type
'typename std::enable_if<std::is_integral<char>::value && sizeof(char) == sizeof(char), char>::type'
(aka 'char') to 'const signed char' in initializer list
etc
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>
If this package is flagged as ARCH_IDENPENDENT by cmake it is possible to consume the generated cmake files for compiling both 32bit and 64bit projects. Otherwise cmake will complain:
CMake Error at CMakeLists.txt:12 (find_package):
Could not find a configuration file for package "cereal" that is compatible
with requested version "".
The following configuration files were considered but not accepted:
cmake/cereal/cerealConfig.cmake, version: 1.3.2 (64bit)
Ive also added a version check to retain the compability with cmake
older than 3.14.
For more info about this flag look here:
https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html
Updates doctest and fixes issues with g++4.7 and MSVC2013 doctest
builds.
Adds new CI targets for g++ 9 and 10, clang 9 through 12.
Adds CI badges for github actions.
use docker containers
remove sudo
install software-properties-common
update before trying install
install wget
cmake and make
install cmake from pip
add apt-transport-https
Use llvm xenial
Fix clang package name
Fix boost with gcc<5
verbose compile
skip boost for gcc<5
macos test
skip boost for macos
test different xcode compilers
use new cmake syntax for selecting platform
no xcode 10 installed
Rename tests
An issue exists when loading vectors of objects where, if the last nvp of
the previous object does not exist in the json file, the itsNextName
variable within the json serializer is not cleared. This causes the vector
serializer to search for that name next (when it should be searching for a
nameless object.) The json serializer then throws during the named search.
Mild reworking of itsNextName solution
This prevents multiple definition errors in Clang,
and also stops dllexporting functions with internal
linkage. Degrades gracefully when C++17 is not
present.
Fix#595Fix#652Fix#582Fix#643
When reading unnamed fields from JSON input, the member/value iterators
are incremented blind without checking if the end of the iterator has
been reached.
Record the size so that this can be checked against the current position
to ensure reading doesn't walk off the end of the iterator.
The archives use the memory address pointed by the shared_ptr as a
unique id which must not be reused during lifetime of the archive.
Therefore, the archives stores a copy of it.
This problem was also reported as CVE-2020-11105.
* 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