Update documentation for data()

This commit is contained in:
Peter Dimov
2019-10-16 00:20:58 +03:00
parent 51f095f019
commit b2faa783ad
3 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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<T, Nbits/8, Order>( value_ )`.
```
const char* data() const noexcept;
unsigned char* data() noexcept;
```
```
unsigned char const* data() const noexcept;
```
[none]
* {blank}

View File

@ -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