Hard-code size of bool as 1 just in case

This commit is contained in:
Nikita Lisitsa 2026-03-15 20:12:18 +03:00
parent 8c0b371fdb
commit ab028c9d7a

View file

@ -139,6 +139,9 @@ namespace pslang::types
{
return std::visit([]<typename T>(primitive_type_base<T> const &) -> std::size_t
{
// Just in case, check for bool explicitly
if constexpr (std::is_same_v<T, bool>)
return 1;
if constexpr (std::is_same_v<T, half_float>)
return 2;
return sizeof(T);