Commit Graph

76 Commits

Author SHA1 Message Date
miyanyan 0225acf247 timespec.hpp: remove duplicated include 2025-05-16 21:48:31 +08:00
Uy Ha d812fa5edc Fix compilation error when std::variant has the same types 2024-04-02 01:23:25 +00:00
Takatoshi Kondo 1fb1dad6bc Merge pull request #1076 from uyha/chrono-no-boost
remove dependency on boost in chrono.hpp
2023-07-06 09:11:42 +09:00
Uy Ha 4bc88d7f6f fix indent 2023-07-04 06:56:39 +00:00
Uy Ha 35638ead37 fix style 2023-07-04 06:06:43 +00:00
Uy Ha f09713e838 fix style 2023-07-04 06:00:22 +00:00
Uy Ha 6507243913 fix style 2023-07-04 05:30:35 +00:00
Uy Ha f2ffcf0b08 remove dependency on boost in chrono.hpp 2023-07-03 20:05:06 +00:00
Uy Ha 211c50c755 enhance error handling, implement object_with_zone, and add more tests 2023-07-03 16:17:12 +00:00
Uy Ha d6b2de9243 fix MSVC build 2023-07-03 14:01:56 +00:00
Uy Ha 327f3d1ad0 implement as and pack for std::variant 2023-07-03 13:37:37 +00:00
Takatoshi Kondo 34f8fd65bb 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
2023-05-14 10:12:21 +09:00
Takatoshi Kondo b051192ed6 Fixed #1037.
Added MSGPACK_NO_BOOST guard for direct inclusion of chrono adaptor,
2022-11-02 09:58:36 +09:00
Tim Blechmann 8b87e62835 make some headers self-contained
some headers are not self-contained, as they depend on
symbols from headers which aren't included
2022-03-23 15:29:12 +08:00
Takatoshi Kondo 49bdd40eab Fixed other similar include problems. 2021-11-02 09:57:37 +09:00
Daniil Kovalev d04b1e7549 Fix empty string deserialization with API version 1 2021-08-28 17:36:39 +03:00
Daniil Kovalev 7b7615a6d9 Modernize codebase
- Enhance CMakeLists.txt files.
- Move to Boost Test from Google Test to support pre-C++11 compilers.
- Add more configurations on CI matrix builds.
- Other minor fixes
2021-07-01 18:17:20 +03:00
Daniil Kovalev 77045f13bb Add tests for std::span adaptor 2021-05-10 22:41:10 +03:00
Daniil Kovalev 388891edad Add support for more binary buffer types
Add support for the following types:
- `std::array<std::byte>`
- `std::span<char>`
- `std::span<unsigned char>`
- `std::span<std::byte>`
2021-05-10 16:06:26 +03:00
Daniil Kovalev 90677eb58c Fix UB in v4raw_ref::operator==
Behaviour of memcmp is undefined if any of pointers passed to it is null.
See https://en.cppreference.com/w/c/string/byte/memcmp for details.
UB was detected on test MSGPACK_V4RAW_REF.pack_unpack_fix_l with UB-sanitizer.
2021-05-09 15:43:14 +03:00
Takatoshi Kondo 6598c6228f Replaced assert with BOOST_ASSERT.
Applied *buffer buf and len checking assert.
Avoided needless code execution if buf is nullptr.
2020-07-02 21:36:04 +09:00
Takatoshi Kondo c8a053557c Propagated CXXFLAGS.
Fixed warnings.
2020-07-02 16:15:08 +09:00
Takatoshi Kondo 8ee6df83cc Fixed warning on fusion adaptor. 2020-07-02 09:13:53 +09:00
Takatoshi Kondo ebb5e0ceca Fixed undefined behavior in chrono converting.
Replaced static_cast with boost::numeric_cast to detect invalid cast
easier.
2020-07-01 16:22:01 +09:00
Takatoshi Kondo 4629583662 Improved clock adaptor. 2020-06-14 18:47:03 +09:00
Takatoshi Kondo 899d3319bf Removed code repeat. 2020-06-12 23:14:23 +09:00
Takatoshi Kondo 6eaf7fd38d Added steady_clock and high_resolution_clock support. 2020-06-12 22:16:19 +09:00
Takatoshi Kondo 3b80c45725 Added complex type support. 2020-06-10 13:26:40 +09:00
yuangongji 2f5b137997 remove C part in source code 2020-06-05 18:12:03 +08:00
Igor Sadchenko 9a3cd0c951 Fixed many warnings/errors with macro __GNUC__(issue #850) 2020-03-26 02:03:25 +03:00
Wojciech Kaluza 41b2af8884 Fix self-including header 2019-05-22 20:38:36 +01:00
Takatoshi Kondo d3fecce359 Added timespec support for C++11 or later. 2019-05-09 14:46:45 +09:00
Takatoshi Kondo 17267ed475 Added -Wconversion support for C++. 2019-03-25 19:48:39 +09:00
Takatoshi Kondo 4f9ec65713 Fixed #741.
Fixed msgpack::type::tuple base class conversion.
Fixed C++03 msgpack::type::make_tuple.
2018-10-16 22:42:50 +09:00
Takatoshi Kondo 1155babda8 Added wstring adaptor. 2018-09-12 16:17:14 +09:00
Takatoshi Kondo 53d2ea9ad3 Fixed #724.
Fixed type mismatch in msgpack_timestamp.
Added 64bit singed postfix.
2018-08-27 22:40:04 +09:00
Takatoshi Kondo 8a788f3a48 Added C++17 std::byte support.
`std::byte` is mapped to
https://github.com/msgpack/msgpack/blob/master/spec.md#int-format-family.

`std::vector<std::byte>` and `std::byte[]` are mapped to https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family.
2018-08-12 16:23:39 +09:00
Takatoshi Kondo 3aae588a6a Merge pull request #706 from redboltz/fix_638_3
Implemented #638.
2018-07-22 18:23:35 +09:00
Takatoshi Kondo cb2dcb19b9 Implemented #638.
Added Time Stamp support.
2018-07-22 16:25:23 +09:00
Takatoshi Kondo 93b944eec4 Fixed #697.
Removed out of range array dereference.
2018-07-21 20:42:40 +09:00
Takatoshi Kondo ec239933db Fixed #671.
Added STR type check to define_map.
2018-04-25 10:43:26 +09:00
Takatoshi Kondo d46f220737 Removed unused code. 2017-11-12 12:31:17 +09:00
Takatoshi Kondo b4db293181 Fixed #644.
Added `as()` checking to MSGPACK_DEFINE family.
2017-11-11 15:44:31 +09:00
Takatoshi Kondo 1ba46a30ce Fixed #640.
Replaced comma with semi colon.
Unified cording style.
2017-11-04 12:55:22 +09:00
Takatoshi Kondo 7ad743f2da Fixed conflict between boost fusion sequence and std::tuple/std::pair. 2017-07-26 10:24:17 +09:00
Takatoshi Kondo a0e4294b5a Set MSGPACK_ZONE_ALIGNOF(char) explicitly.
It makes efficient zone allocation.
If it was omitted, the default alignment was applied. It was inefficient.
2017-07-23 19:11:12 +09:00
Takatoshi Kondo 354ee5b9a3 Merge branch 'alignment' of https://github.com/chshaob1/msgpack-c into chshaob1-alignment 2017-07-22 15:28:12 +09:00
Takatoshi Kondo a502097fd0 Solved #597.
Added `std::optional` and `std::string_view` adaptors.
2017-06-13 18:22:48 +09:00
Takatoshi Kondo bd511a4bd1 Fixed nonnull warnings on gcc 7.1. 2017-06-12 15:14:37 +09:00
Takatoshi Kondo e90231c865 Added 'fallthrough' comments to suppress gcc7 warnings. 2017-04-24 17:16:43 +09:00