Commonly used endian handling functions are extremely error prone. While
- the Boost Endian conversion functions have the same problems, the buffer and
+ mechanism varies from platform to platform.
+ - Commonly used C endian handling functions are extremely error prone. While
+ the Boost Endian conversion functions have some of the same problems, the buffer and
arithmetic classes do not.
- Surprisingly difficult to write and test yourself in a portable yet
efficient (i.e. using intrinsics) way.
- Explicit requests for standardization from Boost Endian users.
- The Boost library is existing practice with years of both implementation
and end-user experience.
- - The committee has already failed once to standardize endian conversion
- functions; perhaps now is time to do it right.
+ - The committee has already started to standardize endian conversion
+ functions once, but had to pull the proposal at the last minute because of
+ name clashes with widely used macros.
+
+Motivation for standardizing only the conversion functions
+
+ - KISS; Providing three different solutions to the same problem space
+ regularly confuses to Boost users and makes endianness solutions harder to
+ teach.
+ - The conversion functions are what end users would need to build their own
+ higher level abstractions.
+ - The safe use patterns for the conversion functions are already familiar to
+ users of platform specific C endian conversion functions.
+ - The Boost buffer and arithmetic types are specified and implemented in
+ terms of the conversion functions, so are easy to add later if desired.
Impact on the standard library
-All three proposed approaches to endianness would be a pure additions to the
+
Endianness conversion functions would be pure additions to the
standard library and would break no existing user code (modulo the usual
-namespace caveats).
+namespace std
caveats).
Proposed wording
The Boost Endian reference documentation for
-Conversion,
-
-Arithmetic, and
-Buffer
-approaches follows the standard library's Method of description
+Conversion follows the standard library's Method of description
[description], so provides a fairly close approximation of what proposed wording
would look like. Actual proposed wording will be provided in a proposal document
-for any portions of the library of interest to the committee. Names will need
-the usual bikeshedding.
-Questions for the Library Evolution Group
-
+ library or a library TS, how would you likely vote for it?Target?
+It is premature to discuss whether to target a TS or the IS. We need to have
+an acceptable proposal in hand and see where we are in the release cycle before
+deciding on the target.
Acknowledgements
The original design for the arithmetic classes was developed by Darin Adler
based on work by Mark Borgerding. The Boost documentation acknowledges