Commit Graph

467 Commits

Author SHA1 Message Date
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
8a9ea6747d Preliminary doc changes to reflect addition of buffers. 2014-11-19 15:58:15 -05:00
Beman
fc7733ade1 Major renaming. Class "endian" becomes class "endian_arithmetic" to mimic the C++ standard's description of such types as "arithmetic types". Rename header accordingly. The convenience typedefs have been changed shorten aligned names, as they are often being, but keeping the unaligned type names relatively short via a simple "_ut" suffix. 2014-11-19 10:53:11 -05:00
Beman
61d9046348 Remove "operator value_type() const noexcept" from buffers. Make the buffer ctor explicit. Buffers were requested by people who do not want automatic conversions because they want full control over conversions, and are very concerned about "efficiency".
Add "operator value_type() const noexcept" to the endian arithmetic types. These types are used by people who do want fully automatic conversions. The arithmetic types need to be drop-in replacements for the built-in arithmetic types for these users.
2014-11-18 14:33:31 -05:00
Beman
221ad3c585 Add use_cases.cpp 2014-11-18 10:05:45 -05:00
Beman
e9f6d2c37c Re-implement the endian types by inheriting from endian_buffer. 2014-11-15 21:04:19 -05:00
Beman
561d8f7070 Initial commit buffers.hpp and related infrastructure. A separate buffer class without arithmetic operators was requested during the formal review. 2014-11-15 08:02:08 -05:00
Beman
f8e60ae4e9 Switch to VC++ 2014, and clear a resulting shadow warning. 2014-11-14 14:23:36 -05:00
Beman
31f930330d Refine "Choosing between endian types and endian conversion functions" docs. 2014-11-14 09:52:44 -05:00
Beman
fd1ab6daff Add additional ambiguity detection. 2014-11-13 13:10:57 -05:00
Beman
c755a6b6af Add overall css style sheet for more uniform presentation and ease of maintenance. 2014-11-12 08:26:01 -05:00
Beman
c41521cead For the endian types, add stream inserters and extractors as requested during the formal review. 2014-11-11 21:08:08 -05:00
Beman
a1be441f8f Initial commit 2014-11-11 10:50:12 -05:00
Beman
4c58fc2efa Clear [-Wunused-parameter] warnings (Roger Leigh) 2014-08-29 08:12:16 -04:00
Beman Dawes
2ebb04e1df Merge pull request #5 from danieljames/metadata
Create metadata file.
2014-08-22 21:55:12 -04:00
Daniel James
fff254cbc2 Add metadata file. 2014-08-21 20:30:29 +01:00
Beman
72a9095a03 Fix tests that were backwards on big endian machines. Thanks to Lars Viklund for testing on three different big-endian systems. 2014-08-15 18:07:12 -04:00
Beman
4cfeb52325 Fix broken link. 2014-08-15 13:11:37 -04:00
Beman
f1dc05db63 Replaced deprecated macro with BOOST_NO_CXX11_DEFAULTED_FUNCTIONS 2014-08-15 13:10:58 -04:00
Beman
e2e99a2e43 Rename to meet boost file name guidelines. 2014-08-15 12:59:23 -04:00
Beman
aaf862a370 Remove files left over from development. 2014-08-15 12:56:56 -04:00
Beman
e609015dd6 Some IDE generated files and directories violate boost guidelines, so ignore. 2014-08-15 12:01:05 -04:00
Beman
49866e0784 Update the README for the boostorg repo. 2014-08-15 11:12:19 -04:00
Beman
17ca240b10 Use boost/predef/detail/endian_compat.h to determine endianness. 2014-08-15 10:59:49 -04:00
Beman
ea44132749 Add native float tests. 2014-08-13 14:02:09 -04:00
Beman
f489fad5e0 Also add aligned float types. Add docs. No tests yet. 2014-08-13 13:44:28 -04:00
Beman
8ea7d201f9 native_float32_t and native_float64_t, fixing issue #2. 2014-08-13 13:23:11 -04:00
Beman
62943e150e Do a pass through docs, bringing up to date where needed. 2014-08-12 10:34:37 -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
d31caa413c Add types native synonyms. All tests now passing, at least on a little endian machine. 2014-08-11 17:17:50 -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
108a0a6d90 Update to reflect Boost moving to git and GitHub. 2014-08-11 10:12:53 -04:00
Beman
f2dad97c44 Upgrade to msvc 2013. Rename msvc2012 to msvc so directory doesn't have to be renamed each msvc release. 2014-08-11 10:01:24 -04:00
Beman
05ac935450 Update done list. 2014-05-16 17:15:01 -06: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
d339470e6e Remove "explicit" from Endian type constructors. Rationale: Having to write "cntr.insert(big_int32_t(value))" instead of "cntr.insert(value)" gets old fast when you are writing application code and the use case arises more or less continuously. Additionally, the use of an endian type is an implementation detail that should not leak into the application code that needs to create values of the type. Furthermore, the ambiguities that caused the constructors to be made explicit no longer occur; they were eliminated when BOOST_MINIMAL_INTEGER_COVER_OPERATORS was introduced to removed a dependency on boost/operators.hpp. If an ambiguity does arise, it is easy to clear via a static_cast or a function-style cast. 2013-09-06 10:36:54 -04:00
Beman
22728f62e2 Add breaking changes heads up 2013-09-01 09:10:00 -04:00
Beman
79391248e0 Add the build .bat files as a maintenance aid. 2013-09-01 08:44:27 -04: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
a40d580782 Get 64-bit builds working. Update timings to reflect 64-bit build. 2013-06-06 08:00:28 -04:00
Beman
944bf285fa Alignment of 64-bit integers on a 32-bit system may be to a 32-bit boundary! 2013-05-30 10:07:43 -04:00
Beman
74b122c581 Alignment of 64-bit integers on a 32-bit system may be to a 32-bit boundary! 2013-05-30 10:07:16 -04:00
Beman
cd985897e6 By default use a shorter test, but add coverage of the aligned types. 2013-05-30 09:19:42 -04:00
Beman
30c44461f6 Only do relational tests if signedness is the same, to quiet GCC warnings. Start using lightweight test. 2013-05-30 08:57:09 -04:00
Beman
2fee60f99b Copy from README 2013-05-29 10:37:44 -04:00
Beman
db3864b3d4 Fix boo boos detected by inspect program. 2013-05-29 09:40:35 -04:00
Beman
457ed73778 Add more UDT use examples. Link to UDT example in conversion function docs. 2013-05-29 09:04:31 -04:00
Beman
fbedc9bb9f Remove another bin_manip file. Note that all the bin-manip files have been copied to git@github.com:Beman/bin-manip.git 2013-05-29 08:36:40 -04:00