Closed
Description
Because const fn
does not support if-else branches:
#[inline]
pub /*const*/ fn new($($elem_name: bool),*) -> Self {
$id($(Self::bool_to_internal($elem_name)),*)
}
#[inline]
/* const */ fn bool_to_internal(x: bool) -> $elem_ty {
if x {
!(0 as $elem_ty)
} else {
0 as $elem_ty
}
}
#[inline]
pub /*const*/ fn splat(value: bool) -> Self {
let value = Self::bool_to_internal(value);
$id($({
#[allow(non_camel_case_types, dead_code)]
struct $elem_name;
value
}),*)
}
EDIT: this issue will make sense as soon as I send the boolean vector PR.
Metadata
Metadata
Assignees
Labels
No labels