diff --git a/doc/endian/arithmetic.adoc b/doc/endian/arithmetic.adoc index 891a3a6..4fe75a1 100644 --- a/doc/endian/arithmetic.adoc +++ b/doc/endian/arithmetic.adoc @@ -244,7 +244,8 @@ namespace boost endian_arithmetic& operator=(T v) noexcept; operator value_type() const noexcept; value_type value() const noexcept; // for exposition; see endian_buffer - const char* data() const noexcept; // for exposition; see endian_buffer + unsigned char* data() noexcept; // for exposition; see endian_buffer + unsigned char const* data() const noexcept; // for exposition; see endian_buffer // arithmetic operations // note that additional operations are provided by the value_type diff --git a/doc/endian/buffers.adoc b/doc/endian/buffers.adoc index a9ca02e..6de03cd 100644 --- a/doc/endian/buffers.adoc +++ b/doc/endian/buffers.adoc @@ -231,12 +231,13 @@ namespace boost explicit endian_buffer(T v) noexcept; endian_buffer& operator=(T v) noexcept; - value_type value() const noexcept; - const char* data() const noexcept; + value_type value() const noexcept; + unsigned char* data() noexcept; + unsigned char const* data() const noexcept; private: - unsigned char value_[ Nbits / CHAR_BIT]; // exposition only + unsigned char value_[Nbits / CHAR_BIT]; // exposition only }; // stream inserter @@ -425,7 +426,10 @@ value_type value() const noexcept; Returns:: `endian_load( value_ )`. ``` -const char* data() const noexcept; +unsigned char* data() noexcept; +``` +``` +unsigned char const* data() const noexcept; ``` [none] * {blank} diff --git a/doc/endian/changelog.adoc b/doc/endian/changelog.adoc index f92a59e..2fd1b87 100644 --- a/doc/endian/changelog.adoc +++ b/doc/endian/changelog.adoc @@ -16,6 +16,7 @@ http://www.boost.org/LICENSE_1_0.txt on GCC and Clang * Added convenience load and store functions * Added floating point convenience typedefs +* Added a non-const overload of `data()`; changed its return type to `unsigned char*` ## Changes in 1.71.0