#pragma once template class uni_type { public: static constexpr size_t Size = Size_; //*********************************** template T& get() { return *reinterpret_cast(buffer); } //*********************************** template const T& get() const { return *reinterpret_cast(buffer); } template operator T() { return *reinterpret_cast(buffer); } //*********************************** constexpr size_t size() const { return Size; } private: char buffer[Size] }; template class uni_type_ptr { public: static constexpr size_t Size = Size_; //*********************************** template T& get() { return *reinterpret_cast(pbuffer); } //*********************************** template const T& get() const { return *reinterpret_cast(pbuffer); } template operator T() { return *reinterpret_cast(pbuffer); } //*********************************** constexpr size_t size() const { return Size; } private: char* pbuffer; };