ΒΆtemplate <class T>
inline consteval size_t size_of() noexcept
template <class T>
inline consteval size_t size_of() noexcept
Description
Returns the size of the type `T`. This is the number of bytes that will be allocated for a type `T`, and includes any tail padding. Use [`data_size_of`]($sus::mem::data_size_of) to exclude tail padding for the purpose of [`memcpy`](https://en.cppreference.com/w/cpp/string/byte/memcpy) or [`sus::ptr::copy`]($sus::ptr::copy). Returns the same value as the builtin [`sizeof`](https://en.cppreference.com/w/cpp/language/sizeof) operator, but disallows calls with a reference type to avoid surprises or bugs when working with references since `sizeof(T & ) == sizeof(T)`.
Declared at: sus/mem/size_of.h:40
Templates
- T