Spaceship-operator: why the data-members must be public / triggers ICE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

in the follwing example

#include <compare> // omitting trigger ICE

template<auto V>
struct A {};

struct B {
    inline constexpr auto operator<=>(const B& rhs) const = default;
private:
    int value; // why must this member be public?
};

int main() {
    A<B{}> t;
}

why must the member value be public?

Side note: if I omit #include <compare> it triggers an ICE.

Compiler: gcc-trunk



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux