$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [endian] Request for comments
From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-04-27 17:18:07
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?