mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-11-02 05:46:23 +01:00
Minimall supported build without boost.
To remove boost dependency, `-DMSGPACK_USE_BOOST=OFF` for cmake. By default, `-DMSGPACK_USE_BOOST` is `ON`. NOTE: In order to build tests `-DMSGPACK_USE_BOOST=ON` is required. For C++ compiler, the option `-DMSGPACK_NO_BOOST` is required to remove boost.
This commit is contained in:
@@ -13,14 +13,13 @@
|
||||
#include "msgpack/versioning.hpp"
|
||||
#include "msgpack/cpp_config.hpp"
|
||||
#include "msgpack/zone_decl.hpp"
|
||||
#include "msgpack/assert.hpp"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
<% GENERATION_LIMIT = 15 %>
|
||||
namespace msgpack {
|
||||
|
||||
@@ -201,7 +200,7 @@ inline zone::zone(size_t chunk_size) /* throw() */ :m_chunk_size(chunk_size), m_
|
||||
|
||||
inline char* zone::get_aligned(char* ptr, size_t align)
|
||||
{
|
||||
BOOST_ASSERT(align != 0 && (align & (align - 1)) == 0); // align must be 2^n (n >= 0)
|
||||
MSGPACK_ASSERT(align != 0 && (align & (align - 1)) == 0); // align must be 2^n (n >= 0)
|
||||
return
|
||||
reinterpret_cast<char*>(
|
||||
reinterpret_cast<uintptr_t>(ptr + (align - 1)) & ~static_cast<uintptr_t>(align - 1)
|
||||
|
||||
Reference in New Issue
Block a user