#How do I convince the compiler that a function argument will always be known at compile time?
11 messages · Page 1 of 1 (latest)
Dang I thought they allowed enums by now
Yeah, the other thing you could do is turn your enum into a trait instead.
c/c++ enums are just sugar for constant integers, define a couple u8s and you're set
Note you could just pass it as a normal argument llvm, will optimize the runtime check away if its a constant argument
Have you actually checked?
pass it as arg + inline always and you're good to go