Spaceship-operator: why the data-members must be public / triggers ICE
Jonathan Wakely
jwakely.gcc@gmail.com
Fri Dec 20 10:40:00 GMT 2019
On Fri, 20 Dec 2019 at 10:30, Klaus Doldinger
<klaus.doldinger64@gmail.com> wrote:
> Am 20.12.19 um 11:25 schrieb Jonathan Wakely:
> > On Fri, 20 Dec 2019, 08:39 Klaus Doldinger, <klaus.doldinger64@gmail.com> wrote:
> >> But, how do I write a class to use as NTTP with private members?
> >
> >
> > You don't.
>
> Well, that is an extremly hard restriction, I think.
> Are there reasons for that?
Several. In short, they don't work very well and introduce
inconsistencies and warts to the language.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1837r0.html
covers some of it.
More information about the Gcc-help
mailing list