generic-predicates 0.1.0

A taste of what const generics could enable in the future
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(generic_const_exprs)]

use generic_predicates::generic_predicates;

generic_predicates! {
    pub fn foo<const N: usize>()
    where
        (N > 23, "`N` must be greater than 23")
    {

    }
}

fn main() {
    foo::<24>();
    foo::<23>();
}