Skip to content

Missing operator== for xt::fixed_shape #2376

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

Activity

  1. tdegeus commented on May 13, 2021

    @tdegeus
    Member

    Looks like a bug indeed. A PR would be much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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