cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
Loading...
Searching...
No Matches
serialization_buffer_impl.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#pragma once
21
22#ifndef MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION
23#if defined(MSGPACK_LIGHT_DOCUMENTATION)
27#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION \
28<compiler-specific-default-value>
29#elif defined(_MSC_VER)
30// With MSVC, non_buffered_serialization_buffer_impl was slightly faster.
31#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 0
32#elif defined(__clang__)
33// With Clang, buffered_serialization_buffer_impl was faster.
34#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 1
35#elif defined(__GNUC__) || defined(__GNUG__)
36// With GCC, non_buffered_serialization_buffer_impl was faster.
37#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 0
38#else
39#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 0
40#endif
41#endif
42
43#if MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION
44
46
47namespace msgpack_light::details {
48
50using serialization_buffer_impl = buffered_serialization_buffer_impl;
51
52} // namespace msgpack_light::details
53
54#else
55
57
58namespace msgpack_light::details {
59
62
63} // namespace msgpack_light::details
64
65#endif
Definition of buffered_serialization_buffer_impl class.
Class to implement internal implementation of serialization_buffer class without buffers.
Namespace of internal implementations.
Definition binary.h:35
non_buffered_serialization_buffer_impl serialization_buffer_impl
Type of internal implementation of serialization_buffer class.
Definition of non_buffered_serialization_buffer_impl class.