Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(const_generics)]
- const FOO: usize = 2;
- fn foo<const N: usize>() -> usize {
- N
- }
- fn main() {
- println!("{}", foo::<{FOO}>());
- println!("{}", foo::<3>());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement