Macro rustc_serialize::serialize::count[][src]

macro_rules! count {
    () => { ... };
    ($one : tt) => { ... };
    ($($pairs : tt $_p : tt) *) => { ... };
    ($odd : tt $($rest : tt) *) => { ... };
}
Expand description

Evaluates to the number of tokens passed to it.

Logarithmic counting: every one or two recursive expansions, the number of tokens to count is divided by two, instead of being reduced by one. Therefore, the recursion depth is the binary logarithm of the number of tokens to count, and the expanded tree is likewise very small.