core icon indicating copy to clipboard operation
core copied to clipboard

Use BOOST_ASSERT instead of a private assert macro for span

Open pdimov opened this issue 10 months ago • 5 comments

Instead of removing assertions under GCC 4.x to retain constexpr support, this retains the assertions and removes constexpr support under GCC 4.x instead. The presumption is that GCC 4.x users care more about assertions than they care about constexpr (which is hardly useful there anyway.)

pdimov avatar Feb 24 '25 01:02 pdimov

I would rather just drop GCC 4 support in span instead.

(In +2 releases after announcing it)

glenfe avatar Feb 24 '25 23:02 glenfe

One does not preclude the other.

pdimov avatar Feb 25 '25 00:02 pdimov

Adding the asserts in the way I did was a non-breaking change. The first breaking change I want to make is dropping GCC 4 support. I'm happy to make it sooner.

(Until then I'm fine with GCC 4 users not having asserts)

glenfe avatar Feb 25 '25 05:02 glenfe

It's not a breaking change if it doesn't break anything. :-)

pdimov avatar Feb 25 '25 13:02 pdimov

Regardless of whether this is applied, develop needs to be merged to master.

(Until then I'm fine with GCC 4 users not having asserts)

That's fine in principle, but in this specific case, span has only one purpose in life and it's to assert. :-)

pdimov avatar Feb 27 '25 19:02 pdimov