]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/json/detail/align.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / json / detail / align.hpp
CommitLineData
20effc67
TL
1//
2// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3//
4// Distributed under the Boost Software License, Version 1.0. (See accompanying
5// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6//
7// Official repository: https://github.com/boostorg/json
8//
9
10#ifndef BOOST_JSON_DETAIL_ALIGN_HPP
11#define BOOST_JSON_DETAIL_ALIGN_HPP
12
20effc67 13#include <boost/align/align.hpp>
20effc67
TL
14
15BOOST_JSON_NS_BEGIN
16namespace detail {
17
20effc67
TL
18using boost::alignment::align;
19
20// VFALCO workaround until Boost.Align has the type
21
22struct class_type {};
23enum unscoped_enumeration_type { };
24enum class scoped_enumeration_type { };
25
26// [support.types] p5: The type max_align_t is a trivial
27// standard-layout type whose alignment requirement
28// is at least as great as that of every scalar type.
29struct max_align_t
30{
31 // arithmetic types
32 char a;
33 char16_t b;
34 char32_t c;
35 bool d;
36 short int e;
37 int f;
38 long int g;
39 long long int h;
40 wchar_t i;
41 float j;
42 double k;
43 long double l;
44 // enumeration types
45 unscoped_enumeration_type m;
46 scoped_enumeration_type n;
47 // pointer types
48 void* o;
49 char* p;
50 class_type* q;
51 unscoped_enumeration_type* r;
52 scoped_enumeration_type* s;
53 void(*t)();
54 // pointer to member types
55 char class_type::* u;
56 void (class_type::*v)();
57 // nullptr
58 std::nullptr_t w;
59};
60
20effc67
TL
61} // detail
62BOOST_JSON_NS_END
63
64#endif