ORM C++
Loading...
Searching...
No Matches
storage.cppm
Go to the documentation of this file.
1export module orm.reflection:storage;
2
3namespace orm::reflection::detail
4{
5template <typename T>
6struct PointerWrapper
7{
8 T value;
9};
10
11template <typename T>
12PointerWrapper(T) -> PointerWrapper<T>;
13
14template <typename T>
15[[nodiscard]] constexpr auto wrapPointer(const T& pointer) noexcept -> PointerWrapper<T>
16{
17 return {pointer};
18}
19
20template <typename T>
21union InactiveStorage
22{
23 char inactive;
24 T object;
25
26 constexpr InactiveStorage() noexcept : inactive{} {}
27 constexpr ~InactiveStorage() {}
28};
29
30} // namespace orm::reflection::detail