diff --git a/crates/vsimd/src/isa.rs b/crates/vsimd/src/isa.rs index 65507a8..95dba94 100644 --- a/crates/vsimd/src/isa.rs +++ b/crates/vsimd/src/isa.rs @@ -63,21 +63,12 @@ macro_rules! is_isa_type { #[macro_export] macro_rules! matches_isa { - ($self:ident, $super:ident) => {{ + ($self:ident, $super:ident $(| $other:ident)*) => {{ // TODO: inline const use $crate::isa::InstructionSet; struct MatchesISA(S); impl MatchesISA { - const VALUE: bool = { $crate::isa::matches_isa_impl::() }; - } - MatchesISA::<$self>::VALUE - }}; - ($self:ident, $super:ident | $($other:ident)|+) => {{ - // TODO: inline const - use $crate::isa::InstructionSet; - struct MatchesISA(S); - impl MatchesISA { - const VALUE: bool = { $crate::isa::matches_isa_impl::() $(||$crate::isa::matches_isa_impl::())+ }; + const VALUE: bool = { $crate::isa::matches_isa_impl::() $(||$crate::isa::matches_isa_impl::())* }; } MatchesISA::<$self>::VALUE }};