public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Spaceship-operator: why the data-members must be public / triggers ICE
@ 2019-11-13  9:24 Klaus Doldinger
  2019-11-13 10:35 ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: Klaus Doldinger @ 2019-11-13  9:24 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-20 10:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13  9:24 Spaceship-operator: why the data-members must be public / triggers ICE Klaus Doldinger
2019-11-13 10:35 ` Jonathan Wakely
2019-11-13 11:43   ` Klaus Doldinger
2019-11-13 12:47     ` Jonathan Wakely
2019-12-20  8:39       ` Klaus Doldinger
2019-12-20 10:25         ` Jonathan Wakely
2019-12-20 10:30           ` Klaus Doldinger
2019-12-20 10:40             ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).