Commit Graph
49 Commits
Author SHA1 Message Date
Peter Dimov 8e3eccaa14 Do not include conversion.hpp from endian_load, endian_store.hpp 2019-04-27 19:15:28 +03:00
Peter Dimov 26b0170a6e Fix typo in conversion.hpp 2019-04-27 01:47:28 +03:00
Peter Dimov a2025a9320 Refactor endian_reverse into its own header, make it work for long and long long 2019-04-26 20:24:27 +03:00
Peter Dimov 01146c9558 Add char and char16_t overloads of endian_reverse 2019-03-19 01:06:53 +02:00
Peter Dimov 07ec535600 boost/predef/detail/endian_compat.h is deprecated; switch to boost/predef/other/endian.h 2018-09-11 18:54:54 +03:00
Peter Dimov 34542134be Merge pull request #23 from arvidn/remove-trailing-whitespace
[cleanup] remove trailing whitespace from source code files
2017-12-21 17:42:03 +02:00
arvidn 4b4123a0fa [cleanup] remove trailing whitespace from source code files 2017-11-04 13:07:54 +01:00
Beman 754a4144ec Clear signed/unsigned warnings 2016-08-09 16:49:20 -04:00
Ben Wiederhake b51593c766 Fix typos in documentation/comments
Credits go to the authors of codespell.
2016-04-03 19:13:04 +02:00
Ben Wiederhake d1865063ad Fix typos in documentation
Found and fixed while reading documentation
2016-04-03 19:12:49 +02:00
Beman f14f080359 Change the specification for native ordering to allow implementations to support orderings in addition to big and little. Thanks to Howard Hinnant for suggesting this change and providing draft wording. Also update headers to reflect actual inclusion hierarchy. 2015-10-16 10:30:34 -04:00
Beman 5c26514ded Add comment explaining omission of certain overloads. 2015-08-03 16:09:06 -04:00
Beman 5caf1d16c8 Remove floating point support for boost 1.58.0. As currently implemented, return by value operations are not reliable because normalization and other bit pattern changes can occur. Docs not updated as yet. Floating point support will be corrected and reinstated for boost 1.59.0, based on in-place customization and inplace and/or copy signatures to replace the unsafe (i.e. native_to_big/little ) by value returns. The big/little_to_native return by value functions are safe, but require reimplementation. 2015-03-24 17:24:56 -04:00
Beman a15f9420cb Add fp_exhaustive_test. 2015-03-20 08:59:47 -04:00
Beman 072b495240 Add Endian specific lightweight_test.hpp with new macro BOOST_TEST_MEMCMP_EQ that uses std::memcmp(...)==0 to determine equality. Bitwise equality is the standard we want floating point round trips to be held to, since NaN's are then equal. 2015-03-05 10:52:28 -05:00
Beman adee2fe513 Add support for deprecated names from pre-review releases. 2015-01-18 19:48:27 -05:00
Beman d15b2fdb1c Refined rationale for choice of exact-length types for conversion support. 2014-12-16 08:49:01 -05:00
Beman 05ea08995c Pass through index.html making corrections and editorial changes. 2014-12-15 08:40:35 -05:00
Beman 971ba888d6 Decompose Reversible into EndianReversible and EndianReversibleInplace. 2014-12-11 11:41:44 -05:00
Beman c201455c84 Change "in_place" to "inplace". Rationale: shortens names without impacting expressiveness. 2014-12-10 09:39:03 -05:00
Beman 2cbcd6f7d3 Rename "runtime_conditional_reverse" to "conditional_reverse". The differing number of arguments is sufficient to disambiguate the compile-time and run-time overloads. 2014-12-10 09:26:47 -05:00
Beman dcca2835a9 Rename "reverse_endianness" to "endian_reverse". Shorter but still plenty explicit. See bikeshed.txt for alternatives considered. 2014-12-10 08:30:30 -05:00
Beman e4466edf4e Drop the _unless_big and _unless_little functions. KISS. They were confusing, and less confusing names were never found. 2014-12-09 20:43:47 -05:00
Beman 55a65c3806 Revert to again supply the reverse_endianness_in_place template. This has the effect of providing a default reverse_endianness_in_place for user-defined types. Add error checking for UDT's to verify this works as desired. Provide a note in the conversion docs to that effect. 2014-12-09 11:36:42 -05:00
Beman a0b5805b73 Minor namespace detail cleanup. 2014-12-09 07:38:04 -05:00
Beman e2045b7ffa Finalize buffer and arithmetic decomposition. Finalize name changes. Finalize test cases. Remove cruft. Docs still to do. 2014-11-26 10:04:33 -05:00
Beman 56103a7bc6 Finish conversion.hpp cleanup after name changes. conversion_test.cpp return-by-value tests reorganized and passing. UTD and in-place tests still to come. Add doc/bikeshed.txt to keep record of naming rationale. 2014-11-24 10:04:23 -05:00
Beman 4197f996ac More conversion.hpp fixes. Some, but not all, conversion_test tests passing. 2014-11-23 10:38:21 -05:00
Beman ce73f59741 Add "_endianness" to the names of the two customization points. These names must be defined in user namespaces (for ADL to work) and so must be much more explicit than names that are defined in namespace endian. 2014-11-23 08:40:58 -05:00
Beman f9c562b4b4 Rework conversion.hpp: Make the UDT customization point for the value returning conversion functions much more explicit. Provide a separate UDT customization point for the in-place conversion functions, and reverse_in_place() overloads for the built-in arithmetic types. Eliminate the unsafe general-use reverse functions. With explicit customization points these are no longer needed. Complete the renaming of conversion functions started in the prior commit. The reverse and reverse_in_place names are much more meaningful and less likely to be misunderstood. The longer "reverse_in_place" name will hopefully at least slow users down before inappropriate (and possibly unsafe use, such as when trying to recover data after an exception). 2014-11-22 16:27:11 -05:00
Beman 84faaa7bbf Rename the conversion functions to discourage unthinking use of the in-place versions as these are unsafe in that they effectively break the type system by treating the buffer as an undescriminated union. Remove the synonym functions based on names popularized by BSD, OS X, and Linux since these are permitted to be implemented as macros, which would cause endless difficulties if encountered. 2014-11-20 15:38:25 -05:00
Beman e9f6d2c37c Re-implement the endian types by inheriting from endian_buffer. 2014-11-15 21:04:19 -05:00
Beman 4c58fc2efa Clear [-Wunused-parameter] warnings (Roger Leigh) 2014-08-29 08:12:16 -04:00
Beman 17ca240b10 Use boost/predef/detail/endian_compat.h to determine endianness. 2014-08-15 10:59:49 -04:00
Beman 071099b656 Remove commented out code residue from treating native as a synonym for big or little. 2014-08-12 08:29:24 -04:00
Beman 8e5cd7dfc4 Treat "native" as synonym for "big" or "little" according to platform endianness, as suggested by Vicente J Botet. Converter_test working. 2014-08-11 16:21:04 -04:00
Beman 8c36890e77 Test and doc updates for Pierre Talbot's int8_t/uint8_t reverse_value() and templated reverse() patch. 2014-04-16 13:52:24 -04:00
Pierre Talbot 11fc1ea374 Add overloads for int8_t and uint8_t (rational: useful with generic programming). Template the reverse function (same body in each overloads). 2014-01-22 18:09:50 +01:00
Beman 016d3b2e7c Rename the endian typedefs. Rationale: Subjective - during three months working on the B-tree library, the *un_t names were a constant source of irritation. Objective - the new scheme, which reverts the *un_t names to having no alignment decoration, provides consistent *_align* decoration for both FP and integer types. Also, the library now provides conversion functions which may reduce use of aligned endian types. 2013-09-01 08:40:32 -04:00
Beman d1d62f3adc Use detail::reverse_value() to implement reverse_value() for float and double, thus eliminating type-punning warning from gcc. 2013-06-07 15:46:14 -04:00
Beman 50b5488997 loop_time_test current work-in-progress 2013-05-27 08:53:18 -04:00
Beman 7f9d91e6d2 Rename unaligned integers to fit the floating point pattern. Unifies the naming pattern, deliberately makes the unaligned type names a bit uglier. 2013-05-26 12:05:33 -04:00
Beman dff7c1254e Add unaligned floating point types and supporting infrastructure. 2013-05-26 08:25:10 -04:00
Beman 41f0c15844 Initial done_list.html. Improve general FAQ. Update example. Add BOOST_NOEXCEPT to types.hpp and cover_operators.hpp. 2013-05-22 13:26:51 -04:00
Beman 6130c5f84c Continue refinement of specs. Add to FAQ. Create function group bookmarks and link to them. 2013-05-19 17:08:42 -04:00
Beman 1fc19c5a27 Rename actual_order to effective_order. We don't know the actual order. Simplify an expression. 2013-05-19 07:15:09 -04:00
Beman 9089eb037b Rename header converters.hpp back to conversion.hpp. Clean up infrastructure. 2013-05-18 16:14:30 -04:00
Beman d7120e6fac Delete the original conversion.hpp.
Rename conversion2.hpp to converters.hpp.
Adjust infrastructure accordingly.
2013-03-18 20:12:41 -04:00
Beman 8b25b2148c Directory reorg to follow Boost Git practice. 2013-03-18 15:02:04 -04:00