macro_rules! call_macro_with_tokens {
{ $mac:ident } => { ... };
}
Expand description
Invokes a macro with the supported token types.
Invokes the macro with the list of Token
types as arguments in priority order, delimited
by commas (including a trailing comma).
The following example creates a SupportedScalar
supertrait that implements ScalarExt
for
each token:
use generic_simd::{call_macro_with_tokens, scalar::ScalarExt};
macro_rules! supported_scalars {
{ $($token:ty,)+ } => {
trait SupportedScalar: Copy $(+ ScalarExt<$token>)* {}
}
}
call_macro_with_tokens!{ supported_scalars }