Boost logo

Boost :

Subject: Re: [boost] [endian] Request for comments
From: Richard Hodges (hodges.r_at_[hidden])
Date: 2019-04-28 07:29:13

On Sat, 27 Apr 2019 at 19:18, Peter Dimov via Boost <boost_at_[hidden]>

> There are two things that I suspect need to be fixed in Boost.Endian, but
> the changes are breaking.
> 1. endian_arithmetic<...> derives publicly from endian_buffer<...>.
> Intuitively, this inheritance relationship doesn't seem right, and it
> prevents endian_arithmetic from being a C++03 POD, due to having a base
> class.
> 2. the data() member function returns char const*. This type is strongly
> associated with null-terminated strings, and as such, using it for the
> underlying bytes of the endian object seems error-prone. I'd much prefer
> to
> return `unsigned char const*` from data() (although in C++17 `std::byte
> const*` might be even better.)
> I can't however estimate with any certainty whether the (mostly aesthetic)
> benefit of these changes would outweigh the users' annoyance from their
> code
> being broken for no strong reason.
> Comments?

Making great omelettes requires breaking great eggs.

Fixing up old interfaces after a library upgrade is a trivial job. Bitching
about it takes longer than doing it.

Let them bitch. Move forward with purpose.

> _______________________________________________
> Unsubscribe & other changes:

Richard Hodges
office: +442032898513
home: +376841522
mobile: +376380212

Boost list run by bdawes at, gregod at, cpdaniel at, john at