Skip to content

Why can't expressions be used in comparisons? #13

@grothesque

Description

@grothesque

Mdarray’s test function test_ops contains the lines

    a = expr::fill(1) - a;
    a = &b - a;

The variables a and b are of typeDTensor<i32, 2>.

I noticed that changing the second line to

    a = &b - expr::fill(1);

does not compile while

    a = b.clone() - expr::fill(1);

does (but consumes the lhs operand).

I wonder if this is this due to design, limitation, or perhaps simply omission?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions