Thiago wrote: >> See my other email: the (1) is not discoverable, teachable, or >> particularly understandable by average C++ developers. It is not a >> good corner of C++.
Ivan Solovev (21 September 2023 11:10) replied: > As you correctly pointed out, most of the developers will just use > public operator==(), and, come C++20, operator<=>(). > > But I'd say that if someone wants to implement three-way comparison > for their classes in C++17, then a bit better understanding of the > language features is a reasonable expectation. You're not thinking of all the different users of code. The author of a class using Qt, that opts to use our mechanism for comparisons, can indeed be expected to understand the fancy new language features, around which that mechanism is built. However, the client of that code, who just wants to compare two things, is a separate player in the game; you're also expecting them to have that level of sophistication. That's more of a stretch: they're just trying to coax their template into coping with one of its parameters being this class that someone using Qt has exposed to them in a library they're using. They may not even be using Qt themselves, merely publishing a helper template that someone else is trying to use in conjunction with some classes written using Qt. We don't want them to throw up their hands and tell the users of their template they don't support use of Qt classes with their templates because "Qt does things weirdly" (as far as they're concerned). Eddy. -- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development