diff --git a/conversion.html b/conversion.html index c23617b..8ec3f0c 100644 --- a/conversion.html +++ b/conversion.html @@ -66,8 +66,9 @@ ordering. User defined types are also supported.
Functions are implemented inline
if appropriate. noexcept
is
-elided for compilers that do not support it.
+
Functions are implemented inline
if appropriate.
+For C++03 compilers, noexcept
is
+elided .
Boost scoped enum emulation is used so that the library still works for compilers that do not support scoped enums.
@@ -76,7 +77,8 @@ Boost scoped enum emulation is used so that the library still works for compiler Header
<boost/endian/conversion.hpp>
Synopsis
-#define BOOST_ENDIAN_INTRINSIC_MSG "message describing presence or absence of intrinsics" +#define BOOST_ENDIAN_INTRINSIC_MSG \ + "message describing presence or absence of intrinsics" namespace boost { @@ -166,7 +168,7 @@ modifiable lvalue of typeT
.T
is an endian type or a class type.If
-T
is an endian type, returns the value ofx
with the order of bytes reversed.If
+T
is an class type, the function:If
T
is a class type, the function:
- Returns the value of
x
with the order of bytes reversed for all data members of types or arrays of @@ -191,7 +193,7 @@ can be found by argument dependent lookup (ADL).endian_reverse_inplace(mlx)
T
is an endian type or a class type.If
-T
is an endian type, reverses the order of bytes inmlx
.If
+T
is an class type, the function:If
T
is a class type, the function:
- Reverses the order of bytes of all data members of
that callsmlx
that have types or arrays of @@ -208,7 +210,7 @@ can be found by argument dependent lookup (ADL).endian_reverse
, onlyendian_reverse
is required for a user-defined type to meet theEndianReversibleInplace
requirements. Although User-defined types are not required to supply anendian_reverse_inplace
-function, doing so may improved efficiency. —end note] +function, doing so may improve efficiency. —end note]Customization points for user-defined types (UDTs)
@@ -239,7 +241,7 @@ double endian_reverse(double x) noexcept;@@ -367,7 +369,7 @@ Pierre Talbot provided theReturns:
-x
, with the order of its constituent bytes reversed.Remarks: Meet the
+EndianReversible
requirements.Remarks: The type of
x
meets theEndianReversible
requirements.[Note: The Boost.Endian library does not provide overloads for the C++ standard library supplied types. —end note]
int8_t endian_reverse()
and templatedendian_reverse_inplace()
implementations.
Last revised: -19 January, 2015
+09 February, 2015© 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 d5543eb..9c99dc0 100644 --- a/index.html +++ b/index.html @@ -417,6 +417,28 @@ and the other middle endian approaches are interesting historical curiosities but have no relevance to today's C++ developers. +Why do both the buffer and arithmetic types exist?
+++Conversions in the buffer types are explicit. Conversions in the arithmetic +types are implicit. This fundamental difference is a deliberate design feature +that would be lost if the inheritance hierarchy were collapsed.
+The original design provided only arithmetic types. Buffer types were +requested during formal review by those wishing total control over when +conversion occurs. They also felt that buffer types would be less likely to be +misused by maintenance programmers not familiar with the implications of +performing a lot of arithmetic operations on the endian arithmetic types.
+What is gained by using the buffer types rather than always just using the +arithmetic types?
+++Assurance than hidden conversions are not performed. This is of overriding +importance to users concerned about achieving the ultimate in terms of speed.
+"Always just using the arithmetic types" is fine for other users. When the +ultimate in speed needs to be ensured, the arithmetic types can be used in the +same design patterns or idioms that would be used for buffer types, resulting in +the same code being generated for either types.
+What are the limitations of floating point support?
@@ -480,7 +502,7 @@ reviewCompatibility with interim releases
-Prior to the official Boost release, class template
-+
Prior to the official Boost release, class template
standards committee for possible inclusion in a Technical Specification or the C++ standard itself.endian_arithmetic
has been used for a decade or more with the same functionality but under the nameendian
. Other names also changed in the official release. If the macroBOOST_ENDIAN_DEPRECATED_NAMES
@@ -531,12 +553,12 @@ in some future release.Specializations for
numeric_limits
. Roger Leigh +Specializations for
-numeric_limits
. Roger Leigh requested that allboost::endian
types providenumeric_limits
specializations. See GitHub issue 4.Character buffer support. Peter Dimov pointed out during the +
Character buffer support. Peter Dimov pointed out during the mini-review that getting and setting basic arithmetic types (or
<cstdint>
equivalents) from/to an offset into an array of unsigned char is a common need. See @@ -551,20 +573,17 @@ and subsequent replies.Acknowledgements
Comments and suggestions were received from Adder, Benaka Moorthi, Christopher Kohlhoff, Cliff Green, Daniel James, Gennaro Proto, Giovanni Piero -Deretta, Gordon Woodhull, dizzy, Hartmut Kaiser, Jeff Flinn, Jeremy Maitin-Shepard, John Filo, John +Deretta, Gordon Woodhull, dizzy, Hartmut Kaiser, Jason Newton, Jeff Flinn, Jeremy Maitin-Shepard, John Filo, John Maddock, Kim Barrett, Marsh Ray, Martin Bonner, Mathias Gaunard, Matias -Capeletto, Neil Mayhew, -Olaf van der -Spek, Paul Bristow, Peter Dimov, Pierre Talbot, Phil Endecott, - -Philip -Bennefall, Pyry Jahkola, +Capeletto, Neil Mayhew, Nevin Liber, +Olaf van der Spek, Paul Bristow, Peter Dimov, Pierre Talbot, Phil Endecott, +Philip Bennefall, Pyry Jahkola, Rene Rivera, Robert Stewart, Roger Leigh, Roland Schwarz, Scott McMurray, Sebastian Redl, Tim Blechmann, Tim Moore, tymofey, Tomas Puverle, Vincente Botet, Yuval Ronen and Vitaly Budovsk. Apologies if anyone has been missed.
Last revised: -27 January, 2015
+09 February, 2015© 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/styles.css b/styles.css index f761bcb..9d89d77 100644 --- a/styles.css +++ b/styles.css @@ -1,16 +1,16 @@ body { - font-family: sans-serif; + font-family: arial, sans-serif; max-width: 6.5in; margin: 0px auto; font-size: 85%; } ins {background-color: #CCFFCC;} del {background-color: #FFCACA;} - pre {background-color: #D7EEFF; font-size: 100%;} - code {font-size: 110%;} - table{font-size: 100%;} + pre {background-color: #D7EEFF; font-size: 95%; font-family: courier, serif;} + code {font-size: 110%; font-family: courier, serif;} + table {font-size: 100%;} /* © Copyright Beman Dawes, 2014