I have code similar to the following:
fn f1<const B: bool>(x:u64) { }
fn f2<const B: bool>(x:u64) {
match B {
true => f1::<false>(x),
false => f1::<true>(x),
}
}
That is, I need to negate a const bool
in function calls. Rust currently doesn't support something as plain as f1::<!B>()
unfortunately. Is there a better way for me to do this other than to litter match
statements everywhere?