Skip to content

Missing operator== for xt::fixed_shape #2376

Open
@tailsu

Description

@tailsu

Repro:

#define XTENSOR_ENABLE_ASSERT 1
#include <xtensor/xfixed.hpp>

void test()
{
  xt::xtensor_fixed<int, xt::xshape<3>> a = {1,2,3};
  std::cout << xt::all(a <= 3) << std::endl;
}

Compilation fails with:

xtensor/xiterator.hpp:1118:38: error: invalid operands to binary expression ('const xt::fixed_shape<3>' and 'const xt::fixed_shape<3>')
        XTENSOR_ASSERT(this->shape() == rhs.shape());

The code works correctly when assertions are not enabled.

Tested on 0.23.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions