Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2023-02-20 06:23:44


On 20/02/2023 12:00, Andrey Semashev wrote:
> Regardless of the intention, this isn't a license to break existing
> code. There are reasons to keep using Boost.Operators in C++20 and
> beyond - one of them being compatibility with prior C++ versions.

Sure, but in theory Boost.Operators classes could just switch to a
simplified implementation when C++20 is in use.

Perhaps there are some cases that become tricky to map from one to the
other, but less_than_comparable naturally maps to spaceship and
equality_comparable happens for free, and most of the others shouldn't
be affected, I would have thought?

> Sometimes it seems the Committee just assumes the world will momentarily
> upgrade to the latest C++ standard and all legacy code cease to exist.

I don't think this is true; it's a long-standing joke that all of the
default behaviours of C++ are wrong, in order to maintain backwards
compatibility of legacy code. (See also: explicit, [[nodiscard]].)

As someone who maintains a 40+-year-old codebase myself, I'm quite
thankful that code in the dark recesses still mostly works without
having to disturb the spiders.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk