diff --git a/conversion.html b/conversion.html index 7efc721..ae07043 100644 --- a/conversion.html +++ b/conversion.html @@ -35,6 +35,9 @@ Endian Types + +
+| @@ -56,27 +59,20 @@ |
|
- <boost/endian/conversion.hpp> - <boost/endian/types.hpp> |
+ <boost/endian/conversion.hpp>
Header boost/endian/conversion.hpp +
Header boost/endian/conversion.hpp
provides byte order reversal and conversion functions that convert objects of
the multi-byte built-in
integer types, and also types float and double,
between native, big, or little endian byte
ordering. User defined types are also supported.
| Caution: Only big endianness and little endianness is supported; - middle endianness is not supported. | -
Functions are implemented inline if appropriate. noexcept is
@@ -178,7 +174,7 @@ type (possibly const) ReversibleValue.
reverse_value(x)
ReversibleValue
The returned value is the value of x with the
order of its constituent bytes reversed.
Reversible.
reversed.
+See
+udt_conversion_example.cpp for an example of a UDT that can used in the
+big_endian,
+little_endian, and
+convert function templates.
int16_t reverse_value(int16_t x) noexcept; int32_t reverse_value(int32_t x) noexcept; @@ -335,7 +336,7 @@ provided. 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.
Last revised: -28 May, 2013
+29 May, 2013© 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/index.html b/index.html index 9ca091a..a134079 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@ Endian Types +
| @@ -59,8 +60,8 @@ |
|
- <boost/endian/conversion.hpp> - <boost/endian/types.hpp> |
+ <boost/endian/conversion.hpp>
|
@@ -48,8 +50,7 @@
Example Limitations Feature set - Typedefs - Comment on naming + Enums and typedefs Class template endianSynopsis @@ -69,13 +70,13 @@ |
|
- <boost/endian/conversion.hpp> - <boost/endian/types.hpp> |
+ <boost/endian/conversion.hpp>
Header <boost/endian/types.hpp> provides -integer-like byte-holder binary types with explicit control over +
Header boost/endian/types.hpp +provides integer and floating point binary types with explicit control over byte order, value type, size, and alignment. Typedefs provide easy-to-use names for common configurations.
These types provide portable byte-holders for integer data, independent of
@@ -100,7 +101,8 @@ arithmetic operators are +, +=, -,
^, ^=, <<, <<=, >>,
>>=. Binary relational operators are ==, !=,
<, <=, >, >=.
Automatic conversion is provided to the underlying integer value type.
+Automatic implicit conversion to the underlying value type is provided. An +explicit conversion constructor from the underlying value type is provided.
The endian_example.cpp program writes a binary file containing four byte big-endian and little-endian integers:
@@ -169,7 +171,7 @@ int main(int, char* []) } -After compiling and executing endian_example.cpp, +
After compiling and executing endian_example.cpp,
a hex dump of test.dat shows:
01020304 00000010 01000000 04030201@@ -614,7 +616,7 @@ differs from endian representation size. Vicente Botet and other reviewers suggested supporting floating point types.
Last revised: -28 May, 2013
+29 May, 2013© Copyright Beman Dawes, 2006-2009, 2013
Distributed under the Boost Software License, Version 1.0. See www.boost.org/ LICENSE_1_0.txt