dimensioned::count_args! [] [src]

macro_rules! count_args {
    ($arg:ident, $($args:ident),+) => { ... };
    ($arg:ident) => { ... };
}

Counts the number of arguments its called with and gives you the total.

Example

#[macro_use]
extern crate dimensioned;

fn main() {
    let x = count_args!(a, b, cat, banana);
    assert_eq!(4, x);
}