MessagePack for C++
Loading...
Searching...
No Matches
cpp03_zone_decl.hpp
Go to the documentation of this file.
1//
2// MessagePack for C++ memory pool
3//
4// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
5//
6// Distributed under the Boost Software License, Version 1.0.
7// (See accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt)
9//
10#ifndef MSGPACK_V1_CPP03_ZONE_DECL_HPP
11#define MSGPACK_V1_CPP03_ZONE_DECL_HPP
12
13#include <cstdlib>
14#include <memory>
15#include <vector>
16
18
19#ifndef MSGPACK_ZONE_CHUNK_SIZE
20#define MSGPACK_ZONE_CHUNK_SIZE 8192
21#endif
22
23#ifndef MSGPACK_ZONE_ALIGN
24#define MSGPACK_ZONE_ALIGN sizeof(void*)
25#endif
26
27#if defined(_MSC_VER)
28#define MSGPACK_ZONE_ALIGNOF(type) __alignof(type)
29#else
30#define MSGPACK_ZONE_ALIGNOF(type) __alignof__(type)
31#endif
32// For a compiler that doesn't support __alignof__:
33// #define MSGPACK_ZONE_ALIGNOF(type) MSGPACK_ZONE_ALIGN
34
35
36namespace msgpack {
37
41
42class zone;
43
44std::size_t aligned_size(
45 std::size_t size,
46 std::size_t align = MSGPACK_ZONE_ALIGN);
47
49} // MSGPACK_API_VERSION_NAMESPACE(v1)
51
52} // namespace msgpack
53
54#endif // MSGPACK_V1_CPP03_ZONE_DECL_HPP
Definition adaptor_base.hpp:15
#define MSGPACK_ZONE_ALIGN
Definition cpp03_zone_decl.hpp:24
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition versioning.hpp:66