Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to support generics? #2

Open
flajann2 opened this issue May 30, 2020 · 1 comment
Open

Is there a way to support generics? #2

flajann2 opened this issue May 30, 2020 · 1 comment

Comments

@flajann2
Copy link

I would like to do something like:

impl_op!<I> (& |a: &BitSparseArray<I>, b: &BitSparseArray<I>| -> BitSparseArray<I> {...}
But currently there appears no way to do that.
Would you like to add that functionality? Or maybe I can and generate a pull request?

Thanks.

@FelixSelter
Copy link

Also const generics support would be great.

impl<const ROWS: usize, const COLS: usize, const OTHERCOLS: usize>
    std::ops::Mul<&Matrix<COLS, OTHERCOLS>> for &Matrix<ROWS, COLS>
where
    [(); ROWS * COLS]:,
    [(); COLS * OTHERCOLS]:,
    [(); ROWS * OTHERCOLS]:,
{
    type Output = Matrix<ROWS, OTHERCOLS>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants