How to Emulate the Spaceship Operator Before C++20 with CRTP—Henrik Sjöström
▻http://isocpp.org/feeder/?FeederAction=clicked&feed=All+Posts&seed=http%3A%2F%2Fisocpp.org%2Fblog%2F2
To wait until the real thing.
How to Emulate the Spaceship Operator Before C++20 with CRTP by Henrik Sjöström
From the article:
Making a class comparable is usually something of a chore. In C++20 we’ll get the “three-way comparison operator” or informally spaceship operator <=>. It will allow the compiler to create comparison operators when we want a simple lexicographical comparison and when we have a more complex comparison we only need to implement a single operator to be able to do all comparisons...
#News,Articles&_Books,