Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(incomplete_features)]
- #![feature(const_generics)]
- fn const_len<const STR: &'static str>() -> usize {
- STR.len()
- }
- fn main() {
- dbg!(const_len::<{ "baguette" }>());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement