Merge from Master

This commit is contained in:
Beman committed 2013-09-01 08:56:47 -04:00
1 parent eb5d1dc602
commit 55dcb406f8
2 files changed
+166 -178

No files matched your search

+138 -137
View File
@@ -227,98 +227,98 @@ conventions for common use cases:</p>
<td width="49%" align="center"><b><i>Alignment</i></b></td>
</tr>
<tr>
<td width="18%"><code>big_int</code><i><b>n</b></i><code>_t</code></td>
<td width="18%"><code>big_align_int</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">16,32,64</td>
<td width="49%" align="center"><code>yes</code></td>
</tr>
<tr>
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_t</code></td>
<td width="18%"><code>big_align_uint</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">16,32,64</td>
<td width="49%" align="center"><code>yes</code></td>
</tr>
<tr>
<td width="18%"><code>big_align_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
<td width="49%" align="center"><code>yes</code></td>
</tr>
<tr>
<td width="18%"><code>little_align_int</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">16,32,64</td>
<td width="49%" align="center"><code>yes</code></td>
</tr>
<tr>
<td width="18%"><code>little_align_uint</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">16,32,64</td>
<td width="49%" align="center"><code>yes</code></td>
</tr>
<tr>
<td width="18%"><code>little_align_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
<td width="49%" align="center"><code>yes</code></td>
</tr>
<tr>
<td width="18%"><code>big_int</code><b><i>n</i></b><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_</code><code>t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>big_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
<td width="49%" align="center"><code>yes</code></td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_t</code></td>
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_</code><code>t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">16,32,64</td>
<td width="49%" align="center"><code>yes</code></td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_t</code></td>
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_</code><code>t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">16,32,64</td>
<td width="49%" align="center"><code>yes</code></td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>little_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
<td width="49%" align="center"><code>yes</code></td>
</tr>
<tr>
<td width="18%"><code>big_int</code><b><i>n</i></b><code>un_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>un_</code><code>t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>big_float</code><i><b>n</b></i><code>un_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>little_int</code><i><b>n</b></i><code>un_</code><code>t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>un_</code><code>t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>little_float</code><i><b>n</b></i><code>un_t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>native_int</code><i><b>n</b></i><code>un_</code><code>t</code></td>
<td width="18%"><code>native_int</code><i><b>n</b></i><code>_</code><code>t</code></td>
<td width="10%" align="center"><code>native</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
<td width="49%" align="center"><code>no</code></td>
</tr>
<tr>
<td width="18%"><code>native_uint</code><i><b>n</b></i><code>un_</code><code>t</code></td>
<td width="18%"><code>native_uint</code><i><b>n</b></i><code>_</code><code>t</code></td>
<td width="10%" align="center"><code>native</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
@@ -332,8 +332,9 @@ memory, files, and network transmissions. </p>
<p><font color="#FF0000"><b><i><span style="background-color: #FFFFFF">Warning:</span></i></b></font><span style="background-color: #FFFFFF">
Code that uses a</span>ligned types is possibly non-portable because alignment
requirements vary between hardware architectures and because alignment may be
affected by compiler switches or pragmas. Furthermore, aligned types
are only available on architectures with 16, 32, and 64-bit integer types.</p>
affected by compiler switches or pragmas. For example, alignment of an 64-bit
integer may be to a 32-bit boundary on a 32-bit machine. Furthermore, aligned types
are only available on architectures with 16, 32, and 64-bit integer types. </p>
<p><b><i>Note:</i></b> One-byte types
have identical
functionality. They are provided to improve code readability and searchability.</p>
@@ -386,103 +387,103 @@ usual operations on integers are supplied.</p>
endian operator--(endian&amp; x, int) noexcept;
};
typedef endian&lt;order::big, float, 32, align::yes&gt; big_float32_t;
typedef endian&lt;order::big, double, 64, align::yes&gt; big_float64_t;
// aligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::yes&gt; little_float32_t;
typedef endian&lt;order::little, double, 64, align::yes&gt; little_float64_t;
// unaligned big endian floating point types
typedef endian&lt;order::big, float, 32, align::no&gt; big_float32un_t;
typedef endian&lt;order::big, double, 64, align::no&gt; big_float64un_t;
typedef endian&lt;order::big, float, 32, align::yes&gt; big_align_float32_t;
typedef endian&lt;order::big, double, 64, align::yes&gt; big_align_float64_t;
// aligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::yes&gt; little_align_float32_t;
typedef endian&lt;order::little, double, 64, align::yes&gt; little_align_float64_t;
// unaligned big endian floating point types
typedef endian&lt;order::big, float, 32, align::no&gt; big_float32un_t;
typedef endian&lt;order::big, double, 64, align::no&gt; big_float64un_t;
// unaligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::no&gt; little_float32un_t;
typedef endian&lt;order::little, double, 64, align::no&gt; little_float64un_t;
typedef endian&lt;order::little, float, 32, align::no&gt; little_float32un_t;
typedef endian&lt;order::little, double, 64, align::no&gt; little_float64un_t;
// aligned big endian signed integer types
typedef endian&lt;order::big, int16_t, 16, align::yes&gt; big_int16_t;
typedef endian&lt;order::big, int32_t, 32, align::yes&gt; big_int32_t;
typedef endian&lt;order::big, int64_t, 64, align::yes&gt; big_int64_t;
// aligned big endian unsigned integer types
typedef endian&lt;order::big, uint16_t, 16, align::yes&gt; big_uint16_t;
typedef endian&lt;order::big, uint32_t, 32, align::yes&gt; big_uint32_t;
typedef endian&lt;order::big, uint64_t, 64, align::yes&gt; big_uint64_t;
// aligned little endian signed integer types
typedef endian&lt;order::little, int16_t, 16, align::yes&gt; little_int16_t;
typedef endian&lt;order::little, int32_t, 32, align::yes&gt; little_int32_t;
typedef endian&lt;order::little, int64_t, 64, align::yes&gt; little_int64_t;
// aligned little endian unsigned integer types
typedef endian&lt;order::little, uint16_t, 16, align::yes&gt; little_uint16_t;
typedef endian&lt;order::little, uint32_t, 32, align::yes&gt; little_uint32_t;
typedef endian&lt;order::little, uint64_t, 64, align::yes&gt; little_uint64_t;
// aligned native endian typedefs are not provided because
// &lt;cstdint&gt; types are superior for this use case
typedef endian&lt;order::big, int16_t, 16, align::yes&gt; big_align_int16_t;
typedef endian&lt;order::big, int32_t, 32, align::yes&gt; big_align_int32_t;
typedef endian&lt;order::big, int64_t, 64, align::yes&gt; big_align_int64_t;
// aligned big endian unsigned integer types
typedef endian&lt;order::big, uint16_t, 16, align::yes&gt; big_align_uint16_t;
typedef endian&lt;order::big, uint32_t, 32, align::yes&gt; big_align_uint32_t;
typedef endian&lt;order::big, uint64_t, 64, align::yes&gt; big_align_uint64_t;
// aligned little endian signed integer types
typedef endian&lt;order::little, int16_t, 16, align::yes&gt; little_align_int16_t;
typedef endian&lt;order::little, int32_t, 32, align::yes&gt; little_align_int32_t;
typedef endian&lt;order::little, int64_t, 64, align::yes&gt; little_align_int64_t;
// aligned little endian unsigned integer types
typedef endian&lt;order::little, uint16_t, 16, align::yes&gt; little_align_uint16_t;
typedef endian&lt;order::little, uint32_t, 32, align::yes&gt; little_align_uint32_t;
typedef endian&lt;order::little, uint64_t, 64, align::yes&gt; little_align_uint64_t;
// aligned native endian typedefs are not provided because
// &lt;cstdint&gt; types are superior for this use case
// unaligned big endian signed integer types
typedef endian&lt;order::big, int_least8_t, 8&gt; big_int8un_t;
typedef endian&lt;order::big, int_least16_t, 16&gt; big_int16un_t;
typedef endian&lt;order::big, int_least32_t, 24&gt; big_int24un_t;
typedef endian&lt;order::big, int_least32_t, 32&gt; big_int32un_t;
typedef endian&lt;order::big, int_least64_t, 40&gt; big_int40un_t;
typedef endian&lt;order::big, int_least64_t, 48&gt; big_int48un_t;
typedef endian&lt;order::big, int_least64_t, 56&gt; big_int56un_t;
typedef endian&lt;order::big, int_least64_t, 64&gt; big_int64un_t;
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;
typedef endian&lt;order::big, int_least32_t, 24&gt; big_int24_t;
typedef endian&lt;order::big, int_least32_t, 32&gt; big_int32_t;
typedef endian&lt;order::big, int_least64_t, 40&gt; big_int40_t;
typedef endian&lt;order::big, int_least64_t, 48&gt; big_int48_t;
typedef endian&lt;order::big, int_least64_t, 56&gt; big_int56_t;
typedef endian&lt;order::big, int_least64_t, 64&gt; big_int64_t;
// unaligned big endian unsigned integer types
typedef endian&lt;order::big, uint_least8_t, 8&gt; big_uint8un_t;
typedef endian&lt;order::big, uint_least16_t, 16&gt; big_uint16un_t;
typedef endian&lt;order::big, uint_least32_t, 24&gt; big_uint24un_t;
typedef endian&lt;order::big, uint_least32_t, 32&gt; big_uint32un_t;
typedef endian&lt;order::big, uint_least64_t, 40&gt; big_uint40un_t;
typedef endian&lt;order::big, uint_least64_t, 48&gt; big_uint48un_t;
typedef endian&lt;order::big, uint_least64_t, 56&gt; big_uint56un_t;
typedef endian&lt;order::big, uint_least64_t, 64&gt; big_uint64un_t;
typedef endian&lt;order::big, uint_least8_t, 8&gt; big_uint8_t;
typedef endian&lt;order::big, uint_least16_t, 16&gt; big_uint16_t;
typedef endian&lt;order::big, uint_least32_t, 24&gt; big_uint24_t;
typedef endian&lt;order::big, uint_least32_t, 32&gt; big_uint32_t;
typedef endian&lt;order::big, uint_least64_t, 40&gt; big_uint40_t;
typedef endian&lt;order::big, uint_least64_t, 48&gt; big_uint48_t;
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 little endian signed integer types
typedef endian&lt;order::little, int_least8_t, 8&gt; little_int8un_t;
typedef endian&lt;order::little, int_least16_t, 16&gt; little_int16un_t;
typedef endian&lt;order::little, int_least32_t, 24&gt; little_int24un_t;
typedef endian&lt;order::little, int_least32_t, 32&gt; little_int32un_t;
typedef endian&lt;order::little, int_least64_t, 40&gt; little_int40un_t;
typedef endian&lt;order::little, int_least64_t, 48&gt; little_int48un_t;
typedef endian&lt;order::little, int_least64_t, 56&gt; little_int56un_t;
typedef endian&lt;order::little, int_least64_t, 64&gt; little_int64un_t;
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;
typedef endian&lt;order::little, int_least32_t, 24&gt; little_int24_t;
typedef endian&lt;order::little, int_least32_t, 32&gt; little_int32_t;
typedef endian&lt;order::little, int_least64_t, 40&gt; little_int40_t;
typedef endian&lt;order::little, int_least64_t, 48&gt; little_int48_t;
typedef endian&lt;order::little, int_least64_t, 56&gt; little_int56_t;
typedef endian&lt;order::little, int_least64_t, 64&gt; little_int64_t;
// unaligned little endian unsigned integer types
typedef endian&lt;order::little, uint_least8_t, 8&gt; little_uint8un_t;
typedef endian&lt;order::little, uint_least16_t, 16&gt; little_uint16un_t;
typedef endian&lt;order::little, uint_least32_t, 24&gt; little_uint24un_t;
typedef endian&lt;order::little, uint_least32_t, 32&gt; little_uint32un_t;
typedef endian&lt;order::little, uint_least64_t, 40&gt; little_uint40un_t;
typedef endian&lt;order::little, uint_least64_t, 48&gt; little_uint48un_t;
typedef endian&lt;order::little, uint_least64_t, 56&gt; little_uint56un_t;
typedef endian&lt;order::little, uint_least64_t, 64&gt; little_uint64un_t;
typedef endian&lt;order::little, uint_least8_t, 8&gt; little_uint8_t;
typedef endian&lt;order::little, uint_least16_t, 16&gt; little_uint16_t;
typedef endian&lt;order::little, uint_least32_t, 24&gt; little_uint24_t;
typedef endian&lt;order::little, uint_least32_t, 32&gt; little_uint32_t;
typedef endian&lt;order::little, uint_least64_t, 40&gt; little_uint40_t;
typedef endian&lt;order::little, uint_least64_t, 48&gt; little_uint48_t;
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
typedef endian&lt;order::native, int_least8_t, 8&gt; native_int8un_t;
typedef endian&lt;order::native, int_least16_t, 16&gt; native_int16un_t;
typedef endian&lt;order::native, int_least32_t, 24&gt; native_int24un_t;
typedef endian&lt;order::native, int_least32_t, 32&gt; native_int32un_t;
typedef endian&lt;order::native, int_least64_t, 40&gt; native_int40un_t;
typedef endian&lt;order::native, int_least64_t, 48&gt; native_int48un_t;
typedef endian&lt;order::native, int_least64_t, 56&gt; native_int56un_t;
typedef endian&lt;order::native, int_least64_t, 64&gt; native_int64un_t;
typedef endian&lt;order::native, int_least8_t, 8&gt; native_int8_t;
typedef endian&lt;order::native, int_least16_t, 16&gt; native_int16_t;
typedef endian&lt;order::native, int_least32_t, 24&gt; native_int24_t;
typedef endian&lt;order::native, int_least32_t, 32&gt; native_int32_t;
typedef endian&lt;order::native, int_least64_t, 40&gt; native_int40_t;
typedef endian&lt;order::native, int_least64_t, 48&gt; native_int48_t;
typedef endian&lt;order::native, int_least64_t, 56&gt; native_int56_t;
typedef endian&lt;order::native, int_least64_t, 64&gt; native_int64_t;
// unaligned native endian unsigned integer types
typedef endian&lt;order::native, uint_least8_t, 8&gt; native_uint8un_t;
typedef endian&lt;order::native, uint_least16_t, 16&gt; native_uint16un_t;
typedef endian&lt;order::native, uint_least32_t, 24&gt; native_uint24un_t;
typedef endian&lt;order::native, uint_least32_t, 32&gt; native_uint32un_t;
typedef endian&lt;order::native, uint_least64_t, 40&gt; native_uint40un_t;
typedef endian&lt;order::native, uint_least64_t, 48&gt; native_uint48un_t;
typedef endian&lt;order::native, uint_least64_t, 56&gt; native_uint56un_t;
typedef endian&lt;order::native, uint_least64_t, 64&gt; native_uint64un_t;
typedef endian&lt;order::native, uint_least8_t, 8&gt; native_uint8_t;
typedef endian&lt;order::native, uint_least16_t, 16&gt; native_uint16_t;
typedef endian&lt;order::native, uint_least32_t, 24&gt; native_uint24_t;
typedef endian&lt;order::native, uint_least32_t, 32&gt; native_uint32_t;
typedef endian&lt;order::native, uint_least64_t, 40&gt; native_uint40_t;
typedef endian&lt;order::native, uint_least64_t, 48&gt; native_uint48_t;
typedef endian&lt;order::native, uint_least64_t, 56&gt; native_uint56_t;
typedef endian&lt;order::native, uint_least64_t, 64&gt; native_uint64_t;
} // namespace endian
} // namespace boost</pre>
@@ -616,7 +617,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 -->29 May, 2013<!--webbot bot="Timestamp" endspan i-checksum="13994" --></p>
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->31 August, 2013<!--webbot bot="Timestamp" endspan i-checksum="34505" --></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>