MessagePack for C++
include
msgpack
v1
detail
cpp11_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_CPP11_ZONE_DECL_HPP
11
#define MSGPACK_V1_CPP11_ZONE_DECL_HPP
12
13
#include "
msgpack/versioning.hpp
"
14
15
#include <cstdlib>
16
#include <memory>
17
#include <vector>
18
19
#include "
msgpack/cpp_config.hpp
"
20
21
#ifndef MSGPACK_ZONE_CHUNK_SIZE
22
#define MSGPACK_ZONE_CHUNK_SIZE 8192
23
#endif
24
25
#ifndef MSGPACK_ZONE_ALIGN
26
#define MSGPACK_ZONE_ALIGN sizeof(void*)
27
#endif
28
29
#if defined(_MSC_VER)
30
#define MSGPACK_ZONE_ALIGNOF(type) __alignof(type)
31
#else
32
#define MSGPACK_ZONE_ALIGNOF(type) __alignof__(type)
33
#endif
34
// For a compiler that doesn't support __alignof__:
35
// #define MSGPACK_ZONE_ALIGNOF(type) MSGPACK_ZONE_ALIGN
36
37
namespace
msgpack
{
38
40
MSGPACK_API_VERSION_NAMESPACE
(v1) {
42
43
class
zone;
44
45
std::size_t
aligned_size
(
46
std::size_t
size
,
47
std::size_t align =
MSGPACK_ZONE_ALIGN
);
48
50
}
// MSGPACK_API_VERSION_NAMESPACE(v1)
52
53
}
// namespace msgpack
54
55
#endif // MSGPACK_V1_CPP11_ZONE_DECL_HPP
msgpack
Definition:
adaptor_base.hpp:15
MSGPACK_ZONE_ALIGN
#define MSGPACK_ZONE_ALIGN
Definition:
cpp11_zone_decl.hpp:26
MSGPACK_API_VERSION_NAMESPACE
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition:
versioning.hpp:58
msgpack::aligned_size
std::size_t aligned_size(std::size_t size, std::size_t align)
Definition:
cpp03_zone.hpp:344
versioning.hpp
msgpack::type::size
std::size_t size(T const &t)
Definition:
size_equal_only.hpp:24
cpp_config.hpp
Generated by
1.8.17