types/description: add support for make_description<void>

This commit is contained in:
Danny Robson 2019-03-17 23:32:50 +11:00
parent effab40a14
commit 94d891c973

View File

@ -70,10 +70,17 @@ namespace cruft::types {
constexpr description
make_description (void) noexcept
{
return {
.category = category_traits_v<T>,
.width = sizeof (T)
};
if constexpr (std::is_void_v<T>) {
return {
.category = category::NONE,
.width = 0,
};
} else {
return {
.category = category_traits_v<T>,
.width = sizeof (T)
};
}
}