Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(const_generics)]
- struct BInt<const From: i32, const To: i32>(i32);
- impl<const F: i32, const T: i32> BInt<{F}, {T}> {
- pub const fn new(x: i32) -> Self {
- Self(x)
- }
- }
- fn main() {
- let x: BInt<{0},{10}>= BInt::new(3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement