1 // A more comprehensive test that const parameters have correctly implemented
6 #![feature(const_generics)] //~ WARNING `const_generics` is incomplete
10 struct VectorLike<T, const SIZE: usize>([T; {SIZE}]);
12 macro_rules! impl_operator_overload {
13 ($trait_ident:ident, $method_ident:ident) => {
15 impl<T, const SIZE: usize> $trait_ident for VectorLike<T, {SIZE}>
19 type Output = VectorLike<T, {SIZE}>;
21 fn $method_ident(self, _: VectorLike<T, {SIZE}>) -> VectorLike<T, {SIZE}> {
30 impl_operator_overload!(Add, add);