Manually apply a few renaming corrections. Reorder typedefs in synopsis for consistency.

This commit is contained in:
Beman
2015-02-23 08:06:01 -05:00
parent 9c0cbae556
commit 63a5b4ff54
3 changed files with 104 additions and 109 deletions

View File

@ -123,10 +123,10 @@ namespace
struct header
{
big_int32_at file_code;
big_int32_at file_length;
little_int32_at version;
little_int32_at shape_type;
big_int32_t file_code;
big_int32_t file_length;
little_int32_t version;
little_int32_t shape_type;
};
const char* filename = "test.dat";
@ -433,49 +433,6 @@ usual operations on integers are supplied.</p>
// typedefs
// aligned big endian floating point types
typedef endian&lt;order::big, float, 32, align::yes&gt; big_float32_at;
typedef endian&lt;order::big, double, 64, align::yes&gt; big_float64_at;
// aligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::yes&gt; little_float32_at;
typedef endian&lt;order::little, double, 64, align::yes&gt; little_float64_at;
// unaligned big endian floating point types
typedef endian&lt;order::big, float, 32, align::no&gt; big_float32_t;
typedef endian&lt;order::big, double, 64, align::no&gt; big_float64_t;
// unaligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::no&gt; little_float32_t;
typedef endian&lt;order::little, double, 64, align::no&gt; little_float64_t;
// aligned big endian signed integer types
typedef endian&lt;order::big, int8_t, 8, align::yes&gt; big_int8_at;
typedef endian&lt;order::big, int16_t, 16, align::yes&gt; big_int16_at;
typedef endian&lt;order::big, int32_t, 32, align::yes&gt; big_int32_at;
typedef endian&lt;order::big, int64_t, 64, align::yes&gt; big_int64_at;
// aligned big endian unsigned integer types
typedef endian&lt;order::big, uint8_t, 8, align::yes&gt; big_uint8_at;
typedef endian&lt;order::big, uint16_t, 16, align::yes&gt; big_uint16_at;
typedef endian&lt;order::big, uint32_t, 32, align::yes&gt; big_uint32_at;
typedef endian&lt;order::big, uint64_t, 64, align::yes&gt; big_uint64_at;
// aligned little endian signed integer types
typedef endian&lt;order::little, int8_t, 8, align::yes&gt; little_int8_at;
typedef endian&lt;order::little, int16_t, 16, align::yes&gt; little_int16_at;
typedef endian&lt;order::little, int32_t, 32, align::yes&gt; little_int32_at;
typedef endian&lt;order::little, int64_t, 64, align::yes&gt; little_int64_at;
// aligned little endian unsigned integer types
typedef endian&lt;order::little, uint8_t, 8, align::yes&gt; little_uint8_at;
typedef endian&lt;order::little, uint16_t, 16, align::yes&gt; little_uint16_at;
typedef endian&lt;order::little, uint32_t, 32, align::yes&gt; little_uint32_at;
typedef endian&lt;order::little, uint64_t, 64, align::yes&gt; little_uint64_at;
// aligned native endian typedefs are not provided because
// &lt;cstdint&gt; types are superior for that use case
// unaligned big endian signed integer types
typedef endian&lt;order::big, int_least8_t, 8&gt; big_int8_t;
typedef endian&lt;order::big, int_least16_t, 16&gt; big_int16_t;
@ -496,6 +453,10 @@ usual operations on integers are supplied.</p>
typedef endian&lt;order::big, uint_least64_t, 56&gt; big_uint56_t;
typedef endian&lt;order::big, uint_least64_t, 64&gt; big_uint64_t;
// unaligned big endian floating point types
typedef endian&lt;order::big, float, 32&gt; big_float32_t;
typedef endian&lt;order::big, double, 64&gt; big_float64_t;
// unaligned little endian signed integer types
typedef endian&lt;order::little, int_least8_t, 8&gt; little_int8_t;
typedef endian&lt;order::little, int_least16_t, 16&gt; little_int16_t;
@ -516,7 +477,11 @@ usual operations on integers are supplied.</p>
typedef endian&lt;order::little, uint_least64_t, 56&gt; little_uint56_t;
typedef endian&lt;order::little, uint_least64_t, 64&gt; little_uint64_t;
// unaligned native endian signed integer types
// unaligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::no&gt; little_float32_t;
typedef endian&lt;order::little, double, 64, align::no&gt; little_float64_t;
// unaligned native endian signed integer types
typedef <b><i>implementation-defined</i></b>_int8_t native_int8_t;
typedef <b><i>implementation-defined</i></b>_int16_t native_int16_t;
typedef <b><i>implementation-defined</i></b>_int24_t native_int24_t;
@ -526,7 +491,7 @@ usual operations on integers are supplied.</p>
typedef <b><i>implementation-defined</i></b>_int56_t native_int56_t;
typedef <b><i>implementation-defined</i></b>_int64_t native_int64_t;
// unaligned native endian unsigned integer types
// unaligned native endian unsigned integer types
typedef <b><i>implementation-defined</i></b>_uint8_t native_uint8_t;
typedef <b><i>implementation-defined</i></b>_uint16_t native_uint16_t;
typedef <b><i>implementation-defined</i></b>_uint24_t native_uint24_t;
@ -535,7 +500,42 @@ usual operations on integers are supplied.</p>
typedef <b><i>implementation-defined</i></b>_uint48_t native_uint48_t;
typedef <b><i>implementation-defined</i></b>_uint56_t native_uint56_t;
typedef <b><i>implementation-defined</i></b>_uint64_t native_uint64_t;
// aligned big endian signed integer types
typedef endian&lt;order::big, int8_t, 8, align::yes&gt; big_int8_at;
typedef endian&lt;order::big, int16_t, 16, align::yes&gt; big_int16_at;
typedef endian&lt;order::big, int32_t, 32, align::yes&gt; big_int32_at;
typedef endian&lt;order::big, int64_t, 64, align::yes&gt; big_int64_at;
// aligned big endian unsigned integer types
typedef endian&lt;order::big, uint8_t, 8, align::yes&gt; big_uint8_at;
typedef endian&lt;order::big, uint16_t, 16, align::yes&gt; big_uint16_at;
typedef endian&lt;order::big, uint32_t, 32, align::yes&gt; big_uint32_at;
typedef endian&lt;order::big, uint64_t, 64, align::yes&gt; big_uint64_at;
// aligned big endian floating point types
typedef endian&lt;order::big, float, 32, align::yes&gt; big_float32_at;
typedef endian&lt;order::big, double, 64, align::yes&gt; big_float64_at;
// aligned little endian signed integer types
typedef endian&lt;order::little, int8_t, 8, align::yes&gt; little_int8_at;
typedef endian&lt;order::little, int16_t, 16, align::yes&gt; little_int16_at;
typedef endian&lt;order::little, int32_t, 32, align::yes&gt; little_int32_at;
typedef endian&lt;order::little, int64_t, 64, align::yes&gt; little_int64_at;
// aligned little endian unsigned integer types
typedef endian&lt;order::little, uint8_t, 8, align::yes&gt; little_uint8_at;
typedef endian&lt;order::little, uint16_t, 16, align::yes&gt; little_uint16_at;
typedef endian&lt;order::little, uint32_t, 32, align::yes&gt; little_uint32_at;
typedef endian&lt;order::little, uint64_t, 64, align::yes&gt; little_uint64_at;
// aligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::yes&gt; little_float32_at;
typedef endian&lt;order::little, double, 64, align::yes&gt; little_float64_at;
// aligned native endian typedefs are not provided because
// &lt;cstdint&gt; types are superior for that use case
} // namespace endian
} // namespace boost</pre>
<p>The <i><b><code>implementation-defined</code></b></i> text above is either
@ -619,8 +619,7 @@ programming.</p>
<p><b>Why bother with the aligned endian types?</b> Aligned integer operations
may be faster (as much as 10 to 20 times faster) if the endianness and alignment of
the type matches the endianness and alignment requirements of the machine. The code,
however, is
likely to be somewhat less portable than with the unaligned types.</p>
however, will be somewhat less portable than with the unaligned types.</p>
<p><b>Why provide the arithmetic operations?</b> Providing a full set of operations reduces program
clutter and makes code both easier to write and to read. Consider
incrementing a variable in a record. It is very convenient to write:</p>
@ -694,7 +693,7 @@ differs from endian representation size. Vicente Botet and other reviewers
suggested supporting floating point types.</p>
<hr>
<p>Last revised:
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->17 February, 2015<!--webbot bot="Timestamp" endspan i-checksum="40541" --></p>
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->23 February, 2015<!--webbot bot="Timestamp" endspan i-checksum="40534" --></p>
<p>© Copyright Beman Dawes, 2006-2009, 2013</p>
<p>Distributed under the Boost Software License, Version 1.0. See
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>

View File

@ -283,42 +283,42 @@ conventions for common use cases:</p>
<td width="15%">8,16,32,64</td>
</tr>
<tr>
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_</code><code>buf_</code><code>t</code></td>
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_</code><code>buf_at</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,32,64</td>
</tr>
<tr>
<td width="18%"><code>big_float</code><i><b>n</b></i><code>_</code><code>buf_</code><code>t</code></td>
<td width="18%"><code>big_float</code><i><b>n</b></i><code>_</code><code>buf_at</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
</tr>
<tr>
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_</code><code>buf_</code><code>t</code></td>
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_</code><code>buf_at</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,32,64</td>
</tr>
<tr>
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_</code><code>buf_</code><code>t</code></td>
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_</code><code>buf_at</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,32,64</td>
</tr>
<tr>
<td width="18%"><code>little_float</code><i><b>n</b></i><code>_</code><code>buf_</code><code>t</code></td>
<td width="18%"><code>little_float</code><i><b>n</b></i><code>_</code><code>buf_at</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
</tr>
<tr>
<td width="18%"><code>native_float</code><i><b>n</b></i><code>_</code><code>buf_</code><code>t</code></td>
<td width="18%"><code>native_float</code><i><b>n</b></i><code>_</code><code>buf_at</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center"><code>native</code></td>
<td width="10%" align="center">signed</td>
@ -398,49 +398,6 @@ usual operations on integers are supplied.</p>
// typedefs
// aligned big endian floating point buffers
typedef endian_buffer&lt;order::big, float, 32, align::yes&gt; big_float32_buf_at;
typedef endian_buffer&lt;order::big, double, 64, align::yes&gt; big_float64_buf_at;
// aligned little endian floating point buffers
typedef endian_buffer&lt;order::little, float, 32, align::yes&gt; little_float32_buf_at;
typedef endian_buffer&lt;order::little, double, 64, align::yes&gt; little_float64_buf_at;
// unaligned big endian floating point buffers
typedef endian_buffer&lt;order::big, float, 32, align::no&gt; big_float32_buf_t;
typedef endian_buffer&lt;order::big, double, 64, align::no&gt; big_float64_buf_t;
// unaligned little endian floating point buffers
typedef endian_buffer&lt;order::little, float, 32, align::no&gt; little_float32_buf_t;
typedef endian_buffer&lt;order::little, double, 64, align::no&gt; little_float64_buf_t;
// aligned big endian signed integer buffers
typedef endian_buffer&lt;order::big, int8_t, 8, align::yes&gt; big_int8_buf_at;
typedef endian_buffer&lt;order::big, int16_t, 16, align::yes&gt; big_int16_buf_at;
typedef endian_buffer&lt;order::big, int32_t, 32, align::yes&gt; big_int32_buf_at;
typedef endian_buffer&lt;order::big, int64_t, 64, align::yes&gt; big_int64_buf_at;
// aligned big endian unsigned integer buffers
typedef endian_buffer&lt;order::big, uint8_t, 8, align::yes&gt; big_uint8_buf_at;
typedef endian_buffer&lt;order::big, uint16_t, 16, align::yes&gt; big_uint16_buf_at;
typedef endian_buffer&lt;order::big, uint32_t, 32, align::yes&gt; big_uint32_buf_at;
typedef endian_buffer&lt;order::big, uint64_t, 64, align::yes&gt; big_uint64_buf_at;
// aligned little endian signed integer buffers
typedef endian_buffer&lt;order::little, int8_t, 8, align::yes&gt; little_int8_buf_at;
typedef endian_buffer&lt;order::little, int16_t, 16, align::yes&gt; little_int16_buf_at;
typedef endian_buffer&lt;order::little, int32_t, 32, align::yes&gt; little_int32_buf_at;
typedef endian_buffer&lt;order::little, int64_t, 64, align::yes&gt; little_int64_buf_at;
// aligned little endian unsigned integer buffers
typedef endian_buffer&lt;order::little, uint8_t, 8, align::yes&gt; little_uint8_buf_at;
typedef endian_buffer&lt;order::little, uint16_t, 16, align::yes&gt; little_uint16_buf_at;
typedef endian_buffer&lt;order::little, uint32_t, 32, align::yes&gt; little_uint32_buf_at;
typedef endian_buffer&lt;order::little, uint64_t, 64, align::yes&gt; little_uint64_buf_at;
// aligned native endian typedefs are not provided because
// &lt;cstdint&gt; types are superior for this use case
// unaligned big endian signed integer buffers
typedef endian_buffer&lt;order::big, int_least8_t, 8&gt; big_int8_buf_t;
typedef endian_buffer&lt;order::big, int_least16_t, 16&gt; big_int16_buf_t;
@ -461,6 +418,10 @@ usual operations on integers are supplied.</p>
typedef endian_buffer&lt;order::big, uint_least64_t, 56&gt; big_uint56_buf_t;
typedef endian_buffer&lt;order::big, uint_least64_t, 64&gt; big_uint64_buf_t;
// unaligned big endian floating point buffers
typedef endian_buffer&lt;order::big, float, 32&gt; big_float32_buf_t;
typedef endian_buffer&lt;order::big, double, 64&gt; big_float64_buf_t;
// unaligned little endian signed integer buffers
typedef endian_buffer&lt;order::little, int_least8_t, 8&gt; little_int8_buf_t;
typedef endian_buffer&lt;order::little, int_least16_t, 16&gt; little_int16_buf_t;
@ -481,6 +442,10 @@ usual operations on integers are supplied.</p>
typedef endian_buffer&lt;order::little, uint_least64_t, 56&gt; little_uint56_buf_t;
typedef endian_buffer&lt;order::little, uint_least64_t, 64&gt; little_uint64_buf_t;
// unaligned little endian floating point buffers
typedef endian_buffer&lt;order::little, float, 32&gt; little_float32_buf_t;
typedef endian_buffer&lt;order::little, double, 64&gt; little_float64_buf_t;
// unaligned native endian signed integer types
typedef <b><i>implementation-defined</i></b>_int8_buf_t native_int8_buf_t;
typedef <b><i>implementation-defined</i></b>_int16_buf_t native_int16_buf_t;
@ -500,7 +465,42 @@ usual operations on integers are supplied.</p>
typedef <b><i>implementation-defined</i></b>_uint48_buf_t native_uint48_buf_t;
typedef <b><i>implementation-defined</i></b>_uint56_buf_t native_uint56_buf_t;
typedef <b><i>implementation-defined</i></b>_uint64_buf_t native_uint64_buf_t;
// aligned big endian signed integer buffers
typedef endian_buffer&lt;order::big, int8_t, 8, align::yes&gt; big_int8_buf_at;
typedef endian_buffer&lt;order::big, int16_t, 16, align::yes&gt; big_int16_buf_at;
typedef endian_buffer&lt;order::big, int32_t, 32, align::yes&gt; big_int32_buf_at;
typedef endian_buffer&lt;order::big, int64_t, 64, align::yes&gt; big_int64_buf_at;
// aligned big endian unsigned integer buffers
typedef endian_buffer&lt;order::big, uint8_t, 8, align::yes&gt; big_uint8_buf_at;
typedef endian_buffer&lt;order::big, uint16_t, 16, align::yes&gt; big_uint16_buf_at;
typedef endian_buffer&lt;order::big, uint32_t, 32, align::yes&gt; big_uint32_buf_at;
typedef endian_buffer&lt;order::big, uint64_t, 64, align::yes&gt; big_uint64_buf_at;
// aligned big endian floating point buffers
typedef endian_buffer&lt;order::big, float, 32, align::yes&gt; big_float32_buf_at;
typedef endian_buffer&lt;order::big, double, 64, align::yes&gt; big_float64_buf_at;
// aligned little endian signed integer buffers
typedef endian_buffer&lt;order::little, int8_t, 8, align::yes&gt; little_int8_buf_at;
typedef endian_buffer&lt;order::little, int16_t, 16, align::yes&gt; little_int16_buf_at;
typedef endian_buffer&lt;order::little, int32_t, 32, align::yes&gt; little_int32_buf_at;
typedef endian_buffer&lt;order::little, int64_t, 64, align::yes&gt; little_int64_buf_at;
// aligned little endian unsigned integer buffers
typedef endian_buffer&lt;order::little, uint8_t, 8, align::yes&gt; little_uint8_buf_at;
typedef endian_buffer&lt;order::little, uint16_t, 16, align::yes&gt; little_uint16_buf_at;
typedef endian_buffer&lt;order::little, uint32_t, 32, align::yes&gt; little_uint32_buf_at;
typedef endian_buffer&lt;order::little, uint64_t, 64, align::yes&gt; little_uint64_buf_at;
// aligned little endian floating point buffers
typedef endian_buffer&lt;order::little, float, 32, align::yes&gt; little_float32_buf_at;
typedef endian_buffer&lt;order::little, double, 64, align::yes&gt; little_float64_buf_at;
// aligned native endian typedefs are not provided because
// &lt;cstdint&gt; types are superior for this use case
} // namespace endian
} // namespace boost</pre>
<p>The <i><b><code>implementation-defined</code></b></i> text in typedefs above is either
@ -663,7 +663,7 @@ any Boost object libraries.</p>
</ul>
<hr>
<p>Last revised:
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->17 February, 2015<!--webbot bot="Timestamp" endspan i-checksum="40541" --></p>
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->23 February, 2015<!--webbot bot="Timestamp" endspan i-checksum="40534" --></p>
<p>© Copyright Beman Dawes, 2006-2009, 2013</p>
<p>Distributed under the Boost Software License, Version 1.0. See
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>

View File

@ -489,12 +489,8 @@ review</a></h3>
<li>The endian arithmetic type aliases have been renamed,
using a naming pattern that is consistent for both integer and floating point,
and a consistent set of aliases supplied for the endian buffer types.</li>
<li>The aligned-type alias names now have the <code>_t</code> suffix, for
consistency with the standard library integer type aliases and because use of
aligned types is much more common than unaligned types.</li>
<li>The unaligned-type alias names now have the <code>_ut</code> suffix. This
is short, yet stands out enough to alert the reader than unusual types are
involved.</li>
<li>The unaligned-type alias names still have the <code>_t</code> suffix, but
the aligned-type alias names now have an <code>_at</code> suffix..</li>
<li><code>endian_reverse()</code> overloads for <code>int8_t</code> and <code>
uint8_t</code> have been added for improved generality. (Pierre Talbot)</li>
<li>Overloads of <code>endian_reverse_inplace()</code> have been replaced with a single <code>
@ -593,7 +589,7 @@ Blechmann, Tim Moore, tymofey, Tomas Puverle, Vincente Botet, Yuval Ronen and
Vitaly Budovsk. Apologies if anyone has been missed.</p>
<hr>
<p>Last revised:
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->17 February, 2015<!--webbot bot="Timestamp" endspan i-checksum="40541" --></p>
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->23 February, 2015<!--webbot bot="Timestamp" endspan i-checksum="40534" --></p>
<p>© Copyright Beman Dawes, 2011, 2013</p>
<p>Distributed under the Boost Software License, Version 1.0. See
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>