I found this reddit thread where they kind of manage to concatenate two slices using a macro in a "const way", but it requires creating derivative const which makes it not usable as const parameters (at least is what I understand).
That being said, If possible it would allow some really cool things like checking the dimensions of matrices or tensor operations at compile time.
Hmm, I can achieve something similar with the array-concat crate right now. Would that fit your use-case or am I missing an intricacy of what you want to achieve? Anyway here's how I'd do something that looks similar (to me) to what you are trying to do:
Yes that works if you declare the const C as dependent on const A and B but independent of Foo. But what I'm trying to do is to create Foo<C> from Foo<A> and Foo<B>; if you try that approach it would required to use an associated constant. Something like this, that I think is not possible.
Maybe this will become available in const { ... } blocks when inline_const is stabilized. According to the PR, const { ... } blocks get access to generic parameters (including const generic parameters?). Then maybe this: