Add sp_type_with_alignment

This commit is contained in:
Peter Dimov
2024-10-06 20:56:48 +03:00
parent 5e6b3a9702
commit beaf20e7b5
3 changed files with 29 additions and 0 deletions

View File

@@ -39,6 +39,16 @@ template<class T> struct sp_type_identity
typedef T type;
};
// boost::type_with_alignment
template<std::size_t A> struct sp_type_with_alignment
{
struct alignas(A) type
{
unsigned char padding[ A ];
};
};
} // namespace detail
} // namespace boost