My Project
aligned_storage.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_ALIGNED_STORAGE_HPP
29 #define BSL_ALIGNED_STORAGE_HPP
30 
31 #include "cstdint.hpp"
32 #include "byte.hpp"
33 
34 namespace bsl
35 {
51  template<typename GUARD, bsl::uintmax N, bsl::uintmax A = 0>
52  struct aligned_storage final
53  {
54  static_assert(N > 0, "empty aligned_storage is not supported");
55 
61  struct type final
62  {
64  alignas(A) byte m_data[N]; // NOLINT
65  };
66  };
67 
69  template<bsl::uintmax N, bsl::uintmax A = 0>
71 }
72 
73 #endif
Implements the std::aligned_storage interface. The only real difference is we use "m_data" instead of...
Definition: aligned_storage.hpp:52
Implements the std::aligned_storage type interface.
Definition: aligned_storage.hpp:61
typename aligned_storage< void, N, A >::type aligned_storage_t
a helper that reduces the verbosity of bsl::aligned_storage
Definition: aligned_storage.hpp:70
byte m_data[N]
an array that provides the underlying storage
Definition: aligned_storage.hpp:64