Count the number of arguments
This macro counts the number of arguments passed to it. The result is a usize constant expression.
Example
use std::macros::count;
assert_eq!(count!(), 0);
assert_eq!(count!("a", 1, true), 3);
Run this example
Count the number of arguments
This macro counts the number of arguments passed to it. The result is a usize constant expression.
use std::macros::count;
assert_eq!(count!(), 0);
assert_eq!(count!("a", 1, true), 3);
Run this example