diff --git a/boost/endian/conversion.hpp b/boost/endian/conversion.hpp
index 1bb5ed4..c079e07 100644
--- a/boost/endian/conversion.hpp
+++ b/boost/endian/conversion.hpp
@@ -19,24 +19,24 @@ namespace endian
{
// unconditional modifying (i.e. in-place) endianness reversal
- inline void flip(int16_t& x);
- inline void flip(int32_t& x);
- inline void flip(int64_t& x);
- inline void flip(uint16_t& x);
- inline void flip(uint32_t& x);
- inline void flip(uint64_t& x);
+ inline void invert(int16_t& x);
+ inline void invert(int32_t& x);
+ inline void invert(int64_t& x);
+ inline void invert(uint16_t& x);
+ inline void invert(uint32_t& x);
+ inline void invert(uint64_t& x);
// unconditional non-modifying endianness reversing copy
- inline void flip(int16_t source, int16_t& target);
- inline void flip(int32_t source, int32_t& target);
- inline void flip(int64_t source, int64_t& target);
- inline void flip(uint16_t source, uint16_t& target);
- inline void flip(uint32_t source, uint32_t& target);
- inline void flip(uint64_t source, uint64_t& target);
+ inline void invert(int16_t source, int16_t& target);
+ inline void invert(int32_t source, int32_t& target);
+ inline void invert(int64_t source, int64_t& target);
+ inline void invert(uint16_t source, uint16_t& target);
+ inline void invert(uint32_t source, uint32_t& target);
+ inline void invert(uint64_t source, uint64_t& target);
// conditional modifying (i.e. in-place) endianness reversal;
- // no effect if native endianness and specified endianness are the same
+ // no effect if native endianness and indicated endianness are the same
template Header boost/endian/conversion.hpp
+provides functions that convert built-in
+integers from the native byte ordering to or from big or little endian byte
+ordering. Effects: Reverses the byte order of Effects: Copies Effects: If the native byte ordering and indicated byte
+ ordering are different, Effects: If the native byte ordering and indicated byte
+ ordering are different, Tomas Puverle was instrumental in identifying and articulating the need to
+support endian conversion as separate from endian types. Last revised:
-27 May, 2011Introduction
-Header <boost/endian/conversion>
-Synopsis
+Reference
+
+
+Synopsis
namespace boost
{
namespace endian
{
+ // invert: verb: put upside down or in the opposite position, order, or arrangement.
+
// unconditional modifying (i.e. in-place) endianness reversal
- inline void flip(int16_t& x);
- inline void flip(int32_t& x);
- inline void flip(int64_t& x);
- inline void flip(uint16_t& x);
- inline void flip(uint32_t& x);
- inline void flip(uint64_t& x);
+ inline void invert(int16_t& x);
+ inline void invert(int32_t& x);
+ inline void invert(int64_t& x);
+ inline void invert(uint16_t& x);
+ inline void invert(uint32_t& x);
+ inline void invert(uint64_t& x);
// unconditional non-modifying endianness reversing copy
- inline void flip(int16_t source, int16_t& target);
- inline void flip(int32_t source, int32_t& target);
- inline void flip(int64_t source, int64_t& target);
- inline void flip(uint16_t source, uint16_t& target);
- inline void flip(uint32_t source, uint32_t& target);
- inline void flip(uint64_t source, uint64_t& target);
+ inline void invert(int16_t source, int16_t& target);
+ inline void invert(int32_t source, int32_t& target);
+ inline void invert(int64_t source, int64_t& target);
+ inline void invert(uint16_t source, uint16_t& target);
+ inline void invert(uint32_t source, uint32_t& target);
+ inline void invert(uint64_t source, uint64_t& target);
- // conditional modifying (i.e. in-place) endianness reversal;
- // no effect if native endianness and specified endianness are the same
+ // conditional modifying (i.e. in-place) endianness reversal
- template <class T> inline void to_big(T& x); // if different, convert native to big
- template <class T> inline void to_little(T& x); // if different, convert native to little
- template <class T> inline void from_big(T& x); // if different, convert big to native
- template <class T> inline void from_little(T& x); // if different, convert little to native
+ template <class T> void native_to_big(T& x);
+ template <class T> void native_to_little(T& x);
+ template <class T> void big_to_native(T& x);
+ template <class T> void little_to_native(T& x);
- // non-modifying copy, conditionally reversing endianness;
- // copy the first argument to the second argument, converting to or from the
- // specified endianness if different than native endianness
+ // non-modifying copy conditionally reversing endianness;
- template <class T> inline void to_big(T native, T& big);
- template <class T> inline void to_little(T native, T& little);
- template <class T> inline void from_big(T big, T& native);
- template <class T> inline void from_little(T little, T& native);
-
-} // namespace endian
+ template <class T> void native_to_big(T source, T& target);
+ template <class T> void native_to_little(T source, T& target);
+ template <class T> void big_to_native(T source, T& target);
+ template <class T> void little_to_native(T source, T& target);
+
+} // namespace endian
} // namespace boost
+Members
+inline void invert(int16_t& x);
+inline void invert(int32_t& x);
+inline void invert(int64_t& x);
+inline void invert(uint16_t& x);
+inline void invert(uint32_t& x);
+inline void invert(uint64_t& x);
+
+
+x
.inline void invert(int16_t source, int16_t& target);
+inline void invert(int32_t source, int32_t& target);
+inline void invert(int64_t source, int64_t& target);
+inline void invert(uint16_t source, uint16_t& target);
+inline void invert(uint32_t source, uint32_t& target);
+inline void invert(uint64_t source, uint64_t& target);
+
+
+source
to target
,
+ reversing the byte order.template <class T> void native_to_big(T& x);
+template <class T> void native_to_little(T& x);
+template <class T> void big_to_native(T& x);
+template <class T> void little_to_native(T& x);
+
+
+invert(x)
, otherwise no effect.template <class T> void native_to_big(T source, T& target);
+template <class T> void native_to_little(T source, T& target);
+template <class T> void big_to_native(T source, T& target);
+template <class T> void little_to_native(T source, T& target);
+
+
invert(source, target)
, otherwise
+ target = source
.Acknowledgements
+
© Copyright Beman Dawes, 2011
Distributed under the Boost Software License, Version 1.0. See www.boost.org/ LICENSE_1_0.txt
--