Issue 55381
Summary Spaceship operator<=> fails on ARM but compiles on x86-64
Labels new issue
Assignees
Reporter reneruhr
    The following code compiles on clang 11 x86 but not on arm:

```
template <class T>
struct A{
    std::array<T,2> data_;
    constexpr friend auto operator<=>(const A<T>& a, const A<T>& b)
    {
        return  ( a.data_ <=> b.data_ );
    }
};
```

Error message:
```
<source>:12:27: error: invalid operands to binary _expression_ ('const std::array<int, 2>' and 'const std::array<int, 2>')
        return  ( a.data_ <=> b.data_ );
```

See [compiler explorer](https://www.godbolt.org/z/W4K5f5hxj).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to