20#ifndef PLYWOOT_REFLECT_HPP
21#define PLYWOOT_REFLECT_HPP
28namespace plywoot::reflect {
34template<
typename T,
typename =
void>
42struct Type<T, typename std::void_t<typename T::DestT>>
45 using DestT =
typename T::DestT;
52template<
typename T, std::
size_t N>
74template<
typename T, std::
size_t N>
81 static constexpr std::size_t
size = N;
93template<
typename... Ts>
106 : cdata_{reinterpret_cast<const std::uint8_t *>(v.
data())},
108 alignment_{alignof(T)}
117 const std::uint8_t *
data()
const {
return cdata_; }
124 std::size_t
size()
const {
return size_; }
134 const std::uint8_t *cdata_{
nullptr};
137 std::size_t size_{0};
140 std::size_t alignment_{0};
Layout()=default
Constructor for an empty layout (no data will be read/written).
Layout(const std::vector< T > &v)
std::size_t alignment() const
const std::uint8_t * data() const
T DestT
Type of the elements in the destination list type.
T DestT
Type of the member types in the target type to pack.
static constexpr std::size_t size
typename T::DestT DestT
Target property type.
T DestT
Target property type.