Skip to content

Commit 1fe6e89

Browse files
ludamadArsenArsenredboltzuyhahiradyazdan
authored
Feat/update master (#2)
* test: Add missing rebind to allocators See https://gcc.gnu.org/gcc-13/porting_to.html * Fixed #1070. - msgpack::type::variant behaves as MessagePack format. e.g.) 12.34 => double 12.0 => uint64_t -12.34 => double -12.0 => int64_t - msgpack::type::variant::as_double() can be used even if interval type is int64_t and/or uint64_t. - msgpack::type::variant::as_*() don't return non const reference internal value. - fix coding style * implement `as` and `pack` for `std::variant` * add option in CMake * fix MSVC build * add headers to Files.cmake * enhance error handling, implement object_with_zone, and add more tests * update CI * remove dependency on boost in chrono.hpp * fix style * fix style * fix style * fix indent * Updated changelog. * Updated the version to 6.1.0. * modified function name 'has_as::check' to avoid ambiguity/conflicts with other libraries/engines's macro definitions (e.g. UE) * Updated zlib for CI. * Optimization of msgpack::zone size on the stack and deferred memory allocation * fix failed test * fix zone::chunk_list::clear * Correction of comments * port optimizations for cpp03 * fix build * replace nullptr -> MSGPACK_NULLPTR * Remove Boost::system. * Remove boost system requirement. * Rename ruby file. --------- Co-authored-by: Arsen Arsenović <arsen@gentoo.org> Co-authored-by: Takatoshi Kondo <redboltz@gmail.com> Co-authored-by: Uy Ha <hchanuy@gmail.com> Co-authored-by: hiradyazdan <hirad.y@gmail.com> Co-authored-by: Arenoros <arenoros@gmail.com>
1 parent 1c90fb3 commit 1fe6e89

31 files changed

Lines changed: 963 additions & 576 deletions

.github/depends/zlib.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ while getopts "b:t:p:" c; do
2727
done
2828

2929
mkdir $prefix || exit 1
30-
wget https://zlib.net/zlib-1.2.13.tar.gz || exit 1
31-
tar -xf zlib-1.2.13.tar.gz || exit 1
32-
cd zlib-1.2.13
30+
wget https://zlib.net/zlib-1.3.tar.gz || exit 1
31+
tar -xf zlib-1.3.tar.gz || exit 1
32+
cd zlib-1.3
3333

3434
build()
3535
{

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
-D MSGPACK_BUILD_TESTS=ON \
5757
-D CMAKE_BUILD_TYPE=Debug \
5858
-D MSGPACK_GEN_COVERAGE=ON \
59+
-D MSGPACK_USE_STD_VARIANT_ADAPTOR=ON \
5960
-D CMAKE_PREFIX_PATH="$HOME/zlib-prefix/64;$HOME/boost-prefix/64" \
6061
-B build \
6162
-S . || exit 1

.github/workflows/gha.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jobs:
145145
3)
146146
export CXX="g++-10"
147147
export MSGPACK_CXX_VERSION="MSGPACK_CXX17=ON"
148+
export MSGPACK_USE_STD_VARIANT_ADAPTOR="MSGPACK_USE_STD_VARIANT_ADAPTOR=ON"
148149
;;
149150
4)
150151
export CXX="clang++-10"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ Makefile
4949
/test/streaming_c
5050
/test/version
5151
/test/zone
52+
53+
build
54+
*-build
55+
.cache
56+
compile_commands.json

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 2023-07-08 version 6.1.0
2+
* Remove dependency on boost in chrono.hpp (#1076)
3+
* Add support for std::variant behavior (#1075)
4+
* Fix msgpack::type::variant behavior to respect MessagePack format (#1071)
5+
* Add rebind allocators (#1065)
6+
17
# 2023-03-02 version 6.0.0
28
## << breaking changes >>
39
* Change CMake package name of C++ library to msgpack-cxx (#1054)

CMakeLists.txt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ OPTION (MSGPACK_CXX14 "Using c++14 compiler" OFF)
2323
OPTION (MSGPACK_CXX17 "Using c++17 compiler" OFF)
2424
OPTION (MSGPACK_CXX20 "Using c++20 compiler" OFF)
2525

26-
OPTION (MSGPACK_32BIT "32bit compile" OFF)
27-
OPTION (MSGPACK_USE_BOOST "Use Boost libraried" ON)
28-
OPTION (MSGPACK_USE_X3_PARSE "Use Boost X3 parse" OFF)
29-
OPTION (MSGPACK_BUILD_TESTS "Build tests" OFF)
30-
OPTION (MSGPACK_BUILD_DOCS "Build Doxygen documentation" ON)
31-
OPTION (MSGPACK_FUZZ_REGRESSION "Enable regression testing" OFF)
32-
OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples" OFF)
33-
OPTION (MSGPACK_GEN_COVERAGE "Generate coverage report" OFF)
34-
OPTION (MSGPACK_USE_STATIC_BOOST "Statically link with boost libraries" OFF)
35-
OPTION (MSGPACK_CHAR_SIGN "Char sign to use (signed or unsigned)")
26+
OPTION (MSGPACK_32BIT "32bit compile" OFF)
27+
OPTION (MSGPACK_USE_BOOST "Use Boost libraried" ON)
28+
OPTION (MSGPACK_USE_X3_PARSE "Use Boost X3 parse" OFF)
29+
OPTION (MSGPACK_BUILD_TESTS "Build tests" OFF)
30+
OPTION (MSGPACK_BUILD_DOCS "Build Doxygen documentation" ON)
31+
OPTION (MSGPACK_FUZZ_REGRESSION "Enable regression testing" OFF)
32+
OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples" OFF)
33+
OPTION (MSGPACK_GEN_COVERAGE "Generate coverage report" OFF)
34+
OPTION (MSGPACK_USE_STATIC_BOOST "Statically link with boost libraries" OFF)
35+
OPTION (MSGPACK_CHAR_SIGN "Char sign to use (signed or unsigned)")
36+
OPTION (MSGPACK_USE_STD_VARIANT_ADAPTOR "Enable the adaptor for std::variant" OFF)
3637

3738
SET (CMAKE_CXX_STANDARD_REQUIRED ON)
3839

@@ -92,6 +93,10 @@ ELSE ()
9293
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=3)
9394
ENDIF ()
9495

96+
IF (MSGPACK_USE_STD_VARIANT_ADAPTOR)
97+
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_USE_STD_VARIANT_ADAPTOR)
98+
ENDIF ()
99+
95100
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
96101
IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.1)
97102
INCLUDE (CheckCXXSourceCompiles)

Files.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ SET (msgpack-cxx_HEADERS
3333
include/msgpack/adaptor/cpp17/carray_byte.hpp
3434
include/msgpack/adaptor/cpp17/optional.hpp
3535
include/msgpack/adaptor/cpp17/string_view.hpp
36+
include/msgpack/adaptor/cpp17/variant.hpp
3637
include/msgpack/adaptor/cpp17/vector_byte.hpp
3738
include/msgpack/adaptor/cpp20/span.hpp
3839
include/msgpack/adaptor/define.hpp
@@ -542,6 +543,7 @@ SET (msgpack-cxx_HEADERS
542543
include/msgpack/v1/adaptor/cpp17/carray_byte.hpp
543544
include/msgpack/v1/adaptor/cpp17/optional.hpp
544545
include/msgpack/v1/adaptor/cpp17/string_view.hpp
546+
include/msgpack/v1/adaptor/cpp17/variant.hpp
545547
include/msgpack/v1/adaptor/cpp17/vector_byte.hpp
546548
include/msgpack/v1/adaptor/cpp20/span.hpp
547549
include/msgpack/v1/adaptor/define.hpp

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
`msgpack` for C++
22
===================
33

4-
Version 6.0.0 [![Build Status](https://github.com/msgpack/msgpack-c/workflows/CI/badge.svg?branch=cpp_master)](https://github.com/msgpack/msgpack-c/actions) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/cpp_master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/cpp_master)
4+
Version 6.1.0 [![Build Status](https://github.com/msgpack/msgpack-c/workflows/CI/badge.svg?branch=cpp_master)](https://github.com/msgpack/msgpack-c/actions) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/cpp_master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/cpp_master)
55
[![codecov](https://codecov.io/gh/msgpack/msgpack-c/branch/cpp_master/graph/badge.svg)](https://codecov.io/gh/msgpack/msgpack-c/branch/cpp_master)
66

77
It's like JSON but smaller and faster.

appveyor.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 6.0.0.{build}
1+
version: 6.1.0.{build}
22

33
branches:
44
only:
@@ -23,18 +23,18 @@ environment:
2323
boost_subdir: lib32-msvc-14.0
2424
build_script:
2525
- ps: |
26-
appveyor DownloadFile http://zlib.net/zlib-1.2.13.tar.gz -FileName zlib-1.2.13.tar.gz
27-
7z x zlib-1.2.13.tar.gz 2> $null
28-
7z x zlib-1.2.13.tar 2> $null
29-
cd zlib-1.2.13
26+
appveyor DownloadFile http://zlib.net/zlib-1.3.tar.gz -FileName zlib-1.3.tar.gz
27+
7z x zlib-1.3.tar.gz 2> $null
28+
7z x zlib-1.3.tar 2> $null
29+
cd zlib-1.3
3030
3131
md build
3232
md prefix
3333
cd build
3434
3535
cmake `
3636
-G $env:msvc `
37-
-D CMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER\zlib-1.2.13\prefix" `
37+
-D CMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER\zlib-1.3\prefix" `
3838
..
3939
if ($LastExitCode -ne 0) { exit $LastExitCode }
4040
@@ -52,7 +52,7 @@ build_script:
5252
-D MSGPACK_BUILD_EXAMPLES=ON `
5353
-D MSGPACK_BUILD_TESTS=ON `
5454
-D CMAKE_EXE_LINKER_FLAGS=/LIBPATH:"$env:boost_prefix\$env:boost_subdir" `
55-
-D CMAKE_PREFIX_PATH="$env:boost_prefix;$env:APPVEYOR_BUILD_FOLDER\zlib-1.2.13\prefix" `
55+
-D CMAKE_PREFIX_PATH="$env:boost_prefix;$env:APPVEYOR_BUILD_FOLDER\zlib-1.3\prefix" `
5656
-D CMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER\prefix" `
5757
-D CMAKE_CXX_FLAGS="/D_VARIADIC_MAX=10 /EHsc /DBOOST_ALL_DYN_LINK" `
5858
..
@@ -62,5 +62,5 @@ build_script:
6262
if ($LastExitCode -ne 0) { exit $LastExitCode }
6363
6464
test_script:
65-
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\zlib-1.2.13\build\Release;%APPVEYOR_BUILD_FOLDER%\build\release;%boost_prefix%\%boost_subdir%
65+
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\zlib-1.3\build\Release;%APPVEYOR_BUILD_FOLDER%\build\release;%boost_prefix%\%boost_subdir%
6666
- ctest -VV -C Release

ci/build_cmake.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cmake \
2121
-D MSGPACK_CHAR_SIGN=${CHAR_SIGN} \
2222
-D MSGPACK_DEFAULT_API_VERSION=${API_VERSION} \
2323
-D MSGPACK_USE_X3_PARSE=${X3_PARSE} \
24+
-D MSGPACK_USE_STD_VARIANT_ADAPTOR=${STD_VARIANT_ADAPTOR} \
2425
-D CMAKE_CXX_FLAGS="${CXXFLAGS} ${ARCH_FLAG}" \
2526
-D CMAKE_INSTALL_PREFIX=$prefix_dir \
2627
-B $build_dir \

0 commit comments

Comments
 (0)