diff --git a/doc/conversion.html b/doc/conversion.html
index ae07043..3e47f40 100644
--- a/doc/conversion.html
+++ b/doc/conversion.html
@@ -91,23 +91,19 @@ namespace endian
enum class order {big, little, native};
// reverse byte order (i.e. endianness)
+ int8_t reverse_value(int8_t x) noexcept;
int16_t reverse_value(int16_t x) noexcept;
int32_t reverse_value(int32_t x) noexcept;
int64_t reverse_value(int64_t x) noexcept;
+ uint8_t reverse_value(uint8_t x) noexcept;
uint16_t reverse_value(uint16_t x) noexcept;
uint32_t reverse_value(uint32_t x) noexcept;
uint64_t reverse_value(uint64_t x) noexcept;
float reverse_value(float x) noexcept;
double reverse_value(double x) noexcept;
- void reverse(int16_t& x) noexcept;
- void reverse(int32_t& x) noexcept;
- void reverse(int64_t& x) noexcept;
- void reverse(uint16_t& x) noexcept;
- void reverse(uint32_t& x) noexcept;
- void reverse(uint64_t& x) noexcept;
- void reverse(float& x) noexcept;
- void reverse(double& x) noexcept;
+ template <class Value>
+ void reverse(Value& x) noexcept;
// reverse byte order unless native endianness is big
template <class ReversibleValue >
@@ -203,9 +199,11 @@ udt_conversion_example.cpp for an example of a UDT that can used in the
little_endian, and
convert
function templates.
int16_t reverse_value(int16_t x) noexcept; +int8_t reverse_value(int8_t x) noexcept; +int16_t reverse_value(int16_t x) noexcept; int32_t reverse_value(int32_t x) noexcept; int64_t reverse_value(int64_t x) noexcept; +uint8_t reverse_value(uint8_t x) noexcept; uint16_t reverse_value(uint16_t x) noexcept; uint32_t reverse_value(uint32_t x) noexcept; uint64_t reverse_value(uint64_t x) noexcept; @@ -215,14 +213,8 @@ double reverse_value(double x) noexcept;Returns:
-x
, with the order of its constituent bytes reversed.void reverse(int16_t& x) noexcept; -void reverse(int32_t& x) noexcept; -void reverse(int64_t& x) noexcept; -void reverse(uint16_t& x) noexcept; -void reverse(uint32_t& x) noexcept; -void reverse(uint64_t& x) noexcept; -void reverse(float& x) noexcept; -void reverse(double& x) noexcept;+template <class Value> + void reverse(Value& x) noexcept;Postconditions: The order of the constituent bytes of
@@ -333,10 +325,12 @@ provided.x
are reversed.Acknowledgements
Tomas Puverle was instrumental in identifying and articulating the need to -support endian conversion as separate from endian integer types. Phil Endecott suggested the form of the value returning signatures. Vicente Botet and other reviewers suggested supporting floating point types and user defined types. General reverse template implementation approach using std::reverse suggested by Mathias Gaunard. Portable implementation approach for 16, 32, and 64-bit integers suggested by tymofey, with avoidance of undefined behavior as suggested by Giovanni Piero Deretta, and a further refinement suggested by Pyry Jahkola. Intrinsic builtins implementation approach for 16, 32, and 64-bit integers suggested by several reviewers, and by David Stone, who provided his Boost licensed macro implementation that became the starting point for boost/endian/detail/intrinsic.hpp.
+support endian conversion as separate from endian integer types. Phil Endecott suggested the form of the value returning signatures. Vicente Botet and other reviewers suggested supporting floating point types and user defined types. General reverse template implementation approach using std::reverse suggested by Mathias Gaunard. Portable implementation approach for 16, 32, and 64-bit integers suggested by tymofey, with avoidance of undefined behavior as suggested by Giovanni Piero Deretta, and a further refinement suggested by Pyry Jahkola. Intrinsic builtins implementation approach for 16, 32, and 64-bit integers suggested by several reviewers, and by David Stone, who provided his Boost licensed macro implementation that became the starting point for boost/endian/detail/intrinsic.hpp. +Pierre Talbot provided theint8_t reverse_value()
and templated +reverse()
implementations.
Last revised: -29 May, 2013
+16 April, 2014© Copyright Beman Dawes, 2011, 2013
Distributed under the Boost Software License, Version 1.0. See www.boost.org/ LICENSE_1_0.txt
diff --git a/doc/done_list.html b/doc/done_list.html index 23ccd3d..cba161d 100644 --- a/doc/done_list.html +++ b/doc/done_list.html @@ -16,9 +16,7 @@ 64-bit(double)
floating point, as requested.
reverse_value()
overloads for int8_t
and
+ uint8_t
have been added for improved generality. (Pierre Talbot)reverse()
have been replaced with a single
+ reverse()
template. (Pierre Talbot)