Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68849 - in sandbox/endian_ext/libs/integer/endian/doc: . html html/toward_boost_integer_endian
From: vicente.botet_at_[hidden]
Date: 2011-02-13 14:58:07


Author: viboes
Date: 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
New Revision: 68849
URL: http://svn.boost.org/trac/boost/changeset/68849

Log:
Integer.Endian: Update doc
Added:
   sandbox/endian_ext/libs/integer/endian/doc/html/
   sandbox/endian_ext/libs/integer/endian/doc/html/index.html (contents, props changed)
   sandbox/endian_ext/libs/integer/endian/doc/html/standalone_HTML.manifest (contents, props changed)
   sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/
   sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/appendices.html (contents, props changed)
   sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/overview.html (contents, props changed)
   sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/reference.html (contents, props changed)
   sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/users_guide.html (contents, props changed)
   sandbox/endian_ext/libs/integer/endian/doc/integer_endian.pdf (contents, props changed)
Text files modified:
   sandbox/endian_ext/libs/integer/endian/doc/Jamfile.v2 | 18
   sandbox/endian_ext/libs/integer/endian/doc/integer_endian.qbk | 558 +++++++++++++++++++++------------------
   2 files changed, 315 insertions(+), 261 deletions(-)

Modified: sandbox/endian_ext/libs/integer/endian/doc/Jamfile.v2
==============================================================================
--- sandbox/endian_ext/libs/integer/endian/doc/Jamfile.v2 (original)
+++ sandbox/endian_ext/libs/integer/endian/doc/Jamfile.v2 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -33,7 +33,7 @@
         # Use graphics not text for navigation:
         <xsl:param>navig.graphics=1
         # How far down we chunk nested sections, basically all of them:
- <xsl:param>chunk.section.depth=2
+ <xsl:param>chunk.section.depth=1
         # Don't put the first section on the same page as the TOC:
         <xsl:param>chunk.first.sections=1
         # How far down sections get TOC's
@@ -47,15 +47,15 @@
         # Path for libraries index:
         <xsl:param>boost.libraries=../../../../libs/libraries.htm
         # Use the main Boost stylesheet:
- <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
+ <xsl:param>html.stylesheet=../../../../doc/src/boostbook.css
 
         # PDF Options:
         # TOC Generation: this is needed for FOP-0.9 and later:
- #<xsl:param>fop1.extensions=1
+ <format>pdf:<xsl:param>fop1.extensions=0
         # Or enable this if you're using XEP:
- <xsl:param>xep.extensions=1
+ <format>pdf:<xsl:param>xep.extensions=1
         # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
- <xsl:param>fop.extensions=0
+ <format>pdf:<xsl:param>fop.extensions=0
         # No indent on body text:
         <xsl:param>body.start.indent=0pt
         # Margin size:
@@ -68,5 +68,9 @@
         # default pnd graphics are awful in PDF form,
         # better use SVG's instead:
         <format>pdf:<xsl:param>admon.graphics.extension=".svg"
- <format>pdf:<xsl:param>admon.graphics.path=$(boost-images)/
- ;
+ <format>pdf:<xsl:param>admon.graphics.path=$(boost-images)
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/endian/doc/html
+ ;
+
+install pdf-install : standalone : <location>. <install-type>PDF ;
+

Added: sandbox/endian_ext/libs/integer/endian/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/endian_ext/libs/integer/endian/doc/html/index.html 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -0,0 +1,119 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Toward Boost.Integer.Endian 0.2.0</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="next" href="toward_boost_integer_endian/overview.html" title="Overview">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="toward_boost_integer_endian/overview.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
+<div class="article">
+<div class="titlepage">
+<div>
+<div><h2 class="title">
+<a name="toward_boost_integer_endian"></a>Toward Boost.Integer.Endian 0.2.0</h2></div>
+<div><div class="authorgroup">
+<div class="author"><h3 class="author">
+<span class="firstname">Beman</span> <span class="surname">Dawes</span>
+</h3></div>
+<div class="author"><h3 class="author">
+<span class="firstname">Vicente J.</span> <span class="surname">Botet Escriba</span>
+</h3></div>
+</div></div>
+<div><p class="copyright">Copyright &#169; 2006 -2009 Beman Dawes</p></div>
+<div><p class="copyright">Copyright &#169; 2010 Vicente J. Botet Escriba</p></div>
+<div><div class="legalnotice">
+<a name="id2922534"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div>
+<hr>
+</div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Overview</span></dt>
+<dd><dl>
+<dt><span class="section">Motivation</span></dt>
+<dt><span class="section">Description</span></dt>
+</dl></dd>
+<dt><span class="section">Users'Guide</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="toward_boost_integer_endian/users_guide.html#toward_boost_integer_endian.users_guide.getting_started">Getting
+ Started</a></span></dt>
+<dt><span class="section">Tutorial</span></dt>
+<dt><span class="section">Examples</span></dt>
+<dt><span class="section">References</span></dt>
+</dl></dd>
+<dt><span class="section">Reference</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.binary_stream_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endiannes</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.endian_domain_map_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">domain_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.integer_endian_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.integer_endian_binary_stream_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section">Appendices</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="toward_boost_integer_endian/appendices.html#toward_boost_integer_endian.appendices.history">Appendix
+ A: History</a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/appendices.html#toward_boost_integer_endian.appendices.rationale">Appendix
+ B: Rationale</a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/appendices.html#toward_boost_integer_endian.appendices.implementation">Appendix
+ C: Implementation Notes</a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/appendices.html#toward_boost_integer_endian.appendices.acknowledgements">Appendix
+ D: Acknowledgements</a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests">Appendix
+ E: Tests</a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/appendices.html#toward_boost_integer_endian.appendices.appendix_f__tickets">Appendix
+ F: Tickets</a></span></dt>
+<dt><span class="section"><a href="toward_boost_integer_endian/appendices.html#toward_boost_integer_endian.appendices.todo">Appendix
+ G: Future plans</a></span></dt>
+</dl></dd>
+</dl>
+</div>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span> is not a part of
+ the Boost libraries.
+ </p></td></tr>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: February 13, 2011 at 18:09:53 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="toward_boost_integer_endian/overview.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/endian_ext/libs/integer/endian/doc/html/standalone_HTML.manifest
==============================================================================
--- (empty file)
+++ sandbox/endian_ext/libs/integer/endian/doc/html/standalone_HTML.manifest 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -0,0 +1,5 @@
+index.html
+toward_boost_integer_endian/overview.html
+toward_boost_integer_endian/users_guide.html
+toward_boost_integer_endian/reference.html
+toward_boost_integer_endian/appendices.html

Added: sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/appendices.html
==============================================================================
--- (empty file)
+++ sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/appendices.html 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -0,0 +1,1035 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Appendices</title>
+<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="up" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="prev" href="reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="toward_boost_integer_endian.appendices"></a><a class="link" href="appendices.html" title="Appendices">Appendices</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="appendices.html#toward_boost_integer_endian.appendices.history">Appendix
+ A: History</a></span></dt>
+<dd><dl>
+<dt><span class="section">Version 0.2.0, Febraury 15, 2011 </span></dt>
+<dt><span class="section">Version 0.1.0, June 15, 2010</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="appendices.html#toward_boost_integer_endian.appendices.rationale">Appendix
+ B: Rationale</a></span></dt>
+<dt><span class="section"><a href="appendices.html#toward_boost_integer_endian.appendices.implementation">Appendix
+ C: Implementation Notes</a></span></dt>
+<dt><span class="section"><a href="appendices.html#toward_boost_integer_endian.appendices.acknowledgements">Appendix
+ D: Acknowledgements</a></span></dt>
+<dt><span class="section"><a href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests">Appendix
+ E: Tests</a></span></dt>
+<dd><dl>
+<dt><span class="section">binary_stream_test</span></dt>
+<dt><span class="section">integer_endian_pack_test</span></dt>
+<dt><span class="section">integer_endian_test</span></dt>
+<dt><span class="section">integer_endian_arithmetic_operation_test</span></dt>
+<dt><span class="section">integer_endian_view_test</span></dt>
+<dt><span class="section">integer_endian_convert_test</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="appendices.html#toward_boost_integer_endian.appendices.appendix_f__tickets">Appendix
+ F: Tickets</a></span></dt>
+<dt><span class="section"><a href="appendices.html#toward_boost_integer_endian.appendices.todo">Appendix
+ G: Future plans</a></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.appendices.history"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.history" title="Appendix A: History">Appendix
+ A: History</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Version 0.2.0, Febraury 15, 2011 </span></dt>
+<dt><span class="section">Version 0.1.0, June 15, 2010</span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.history.__version_0_2_0__febraury_15__2011__"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.history.__version_0_2_0__febraury_15__2011__" title="Version 0.2.0, Febraury 15, 2011"><span class="bold"><strong>Version 0.2.0, Febraury 15, 2011</strong></span> </a>
+</h4></div></div></div>
+<p>
+ Move to boost/integer/endian directory.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.history.__version_0_1_0__june_15__2010_"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.history.__version_0_1_0__june_15__2010_" title="Version 0.1.0, June 15, 2010"><span class="bold"><strong>Version 0.1.0, June 15, 2010</strong></span></a>
+</h4></div></div></div>
+<p>
+ Split of Boost.Integer.Endian + Added Endian views.
+ </p>
+<p>
+ <span class="bold"><strong>Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<p class="simpara">
+ Endian packs
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ Big endian | little endian | native endian byte ordering.
+ </li>
+<li class="listitem">
+ Signed | unsigned
+ </li>
+<li class="listitem">
+ Unaligned | aligned
+ </li>
+<li class="listitem">
+ 1-8 byte (unaligned) | 2, 4, 8 byte (aligned)
+ </li>
+<li class="listitem">
+ Choice of integer value type
+ </li>
+</ul></div>
+</li>
+<li class="listitem">
+ Endian integers with the whole set of arithmetics operators based on
+ endian pack.
+ </li>
+<li class="listitem">
+ Operators &lt;= and =&gt; for unformatted binary (as opposed to formatted
+ character) stream insertion and extraction of built-in, std::string
+ types and of endian types.
+ </li>
+<li class="listitem">
+ Views of aligned endian unaware integer types as endian packs or endian
+ integers so we can make endian conversion.
+ </li>
+<li class="listitem">
+<p class="simpara">
+ Generic in place conversion between different endian formats.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ Very simple interface: convert_to/from&lt;endiannes domain&gt;(),
+ </li>
+<li class="listitem">
+ Support for built-in and user-defined data types view as fusion
+ sequences.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.appendices.rationale"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.rationale" title="Appendix B: Rationale">Appendix
+ B: Rationale</a>
+</h3></div></div></div>
+<a name="toward_boost_integer_endian.appendices.rationale.design_considerations_for__emphasis_role__bold__boost_integer_endian_ext__emphasis_"></a><h5>
+<a name="id2967515"></a>
+ <a class="link" href="appendices.html#toward_boost_integer_endian.appendices.rationale.design_considerations_for__emphasis_role__bold__boost_integer_endian_ext__emphasis_">Design
+ considerations for <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span></a>
+ </h5>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Must be suitable for I/O - in other words, must be memcpyable.
+ </li>
+<li class="listitem">
+ Must provide exactly the size and internal byte ordering specified.
+ </li>
+<li class="listitem">
+ Must work correctly when the internal integer representation has more
+ bits that the sum of the bits in the external byte representation. Sign
+ extension must work correctly when the internal integer representation
+ type has more bits than the sum of the bits in the external bytes. For
+ example, using a 64-bit integer internally to represent 40-bit (5 byte)
+ numbers must work for both positive and negative values.
+ </li>
+<li class="listitem">
+ Must work correctly (including using the same defined external representation)
+ regardless of whether a compiler treats char as signed or unsigned.
+ </li>
+<li class="listitem">
+ Unaligned types must not cause compilers to insert padding bytes.
+ </li>
+<li class="listitem">
+ The implementation should supply optimizations only in very limited circumstances.
+ Experience has shown that optimizations of endian integers often become
+ pessimizations. While this may be obvious when changing machines or compilers,
+ it also happens when changing compiler switches, compiler versions, or
+ CPU models of the same architecture.
+ </li>
+<li class="listitem">
+ It is better software engineering if the same implementation works regardless
+ of the CPU endianness. In other words, #ifdefs should be avoided where
+ possible.
+ </li>
+</ul></div>
+<a name="toward_boost_integer_endian.appendices.rationale.experience"></a><h5>
+<a name="id2967623"></a>
+ <a class="link" href="appendices.html#toward_boost_integer_endian.appendices.rationale.experience">Experience</a>
+ </h5>
+<p>
+ Classes with similar functionality have been independently developed by several
+ Boost programmers and used very successful in high-value, high-use applications
+ for many years. These independently developed endian libraries often evolved
+ from C libraries that were also widely used. Endian integers have proven
+ widely useful across a wide range of computer architectures and applications.
+ </p>
+<a name="toward_boost_integer_endian.appendices.rationale.motivating_use_cases"></a><h5>
+<a name="id2967656"></a>
+ <a class="link" href="appendices.html#toward_boost_integer_endian.appendices.rationale.motivating_use_cases">Motivating
+ use cases</a>
+ </h5>
+<p>
+ Neil Mayhew writes: "I can also provide a meaningful use-case for this
+ library: reading TrueType font files from disk and processing the contents.
+ The data format has fixed endianness (big) and has unaligned values in various
+ places. Using <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span> simplifies
+ and cleans the code wonderfully."
+ </p>
+<a name="toward_boost_integer_endian.appendices.rationale.c__0x"></a><h5>
+<a name="id2967693"></a>
+ <a class="link" href="appendices.html#toward_boost_integer_endian.appendices.rationale.c__0x">C++0x</a>
+ </h5>
+<p>
+ The availability of the C++0x Defaulted Functions feature is detected automatically,
+ and will be used if present to ensure that objects of class endian are trivial,
+ and thus POD's.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.appendices.implementation"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.implementation" title="Appendix C: Implementation Notes">Appendix
+ C: Implementation Notes</a>
+</h3></div></div></div>
+<a name="toward_boost_integer_endian.appendices.implementation.faq"></a><h5>
+<a name="id2967741"></a>
+ <a class="link" href="appendices.html#toward_boost_integer_endian.appendices.implementation.faq">FAQ</a>
+ </h5>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Why bother with endian types?</strong></span> External
+ data portability and both speed and space efficiency. Availability of
+ additional binary integer sizes and alignments is important in some applications.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Why not just use Boost.Serialization?</strong></span>
+ Serialization involves a conversion for every object involved in I/O.
+ Endian objects require no conversion or copying. They are already in
+ the desired format for binary I/O. Thus they can be read or written in
+ bulk.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Why bother with binary I/O? Why not just use C++
+ Standard Library stream inserters and extractors?</strong></span> Using binary
+ rather than character representations can be more space efficient, with
+ a side benefit of faster I/O. CPU time is minimized because conversions
+ to and from string are eliminated. Furthermore, binary integers are fixed
+ size, and so fixed-size disk records are possible, easing sorting and
+ allowing direct access. Disadvantages, such as the inability to use text
+ utilities on the resulting files, limit usefulness to applications where
+ the binary I/O advantages are paramount.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Do these types have any uses outside of I/O?</strong></span>
+ Probably not, except for native endianness which can be used for fine
+ grained control over size and alignment.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Is there a performance hit when doing arithmetic
+ using integer endian types?</strong></span> Yes, for sure, compared to arithmetic
+ operations on native integer types. However, these types are usually
+ be faster, and sometimes much faster, for I/O compared to stream inserters
+ and extractors, or to serialization.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Are endian types POD's?</strong></span> Yes for C++0x.
+ No for C++03, although several macros are available to force PODness
+ in all cases.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>What are the implications endian types not being
+ POD's with C++03 compilers?</strong></span> They can't be used in unions.
+ Also, compilers aren't required to align or lay out storage in portable
+ ways, although this potential problem hasn't prevented use of <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span> with real compilers.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Which is better, big-endian or little-endian?</strong></span>
+ Big-endian tends to be a bit more of an industry standard, but little-endian
+ may be preferred for applications that run primarily on x86 (Intel/AMD)
+ and other little-endian CPU's. The Wikipedia
+ article gives more pros and cons.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>What good is native endianness?</strong></span> It provides
+ alignment and size guarantees not available from the built-in types.
+ It eases generic programming.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Why bother with the aligned endian types?</strong></span>
+ Aligned integer operations may be faster (20 times, in one measurement)
+ if the endianness and alignment of the type matches the endianness and
+ alignment requirements of the machine. On common CPU architectures, that
+ optimization is only available for aligned types. That allows I/O of
+ maximally efficient types on an application's primary platform, yet produces
+ data files are portable to all platforms. The code, however, is likely
+ to be more fragile and less portable than with the unaligned types.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Endian types are really just byte-holders. Why
+ provide the arithmetic operations at all?</strong></span> 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:
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="special">++</span><span class="identifier">record</span><span class="special">.</span><span class="identifier">foo</span><span class="special">;</span>
+</pre>
+<p>
+ Rather than:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">temp</span><span class="special">(</span> <span class="identifier">record</span><span class="special">.</span><span class="identifier">foo</span><span class="special">);</span>
+<span class="special">++</span><span class="identifier">temp</span><span class="special">;</span>
+<span class="identifier">record</span><span class="special">.</span><span class="identifier">foo</span> <span class="special">=</span> <span class="identifier">temp</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Why do binary stream insertion and extraction use
+ operators &lt;= and &gt;= rather than &lt;&lt;= and &gt;&gt;=?</strong></span>
+ &lt;&lt;= and &gt;&gt;= associate right-to-left, which is the opposite
+ of &lt;&lt; and &gt;&gt;, so would be very confusing and error prone.
+ &lt;= and &gt;= associate left-to-right.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.appendices.acknowledgements"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.acknowledgements" title="Appendix D: Acknowledgements">Appendix
+ D: Acknowledgements</a>
+</h3></div></div></div>
+<p>
+ Original design developed by Darin Adler based on classes developed by Mark
+ Borgerding. Four original class templates combined into a single endian class
+ template by Beman Dawes, who put the library together, provided documentation,
+ and added the typedefs. He also added the unrolled_byte_loops sign partial
+ specialization to correctly extend the sign when cover integer size differs
+ from endian representation size.
+ </p>
+<p>
+ Comments and suggestions were received from Benaka Moorthi, Christopher Kohlhoff,
+ Cliff Green, Gennaro Proto, Giovanni Piero Deretta, dizzy, Jeff Flinn, John
+ Maddock, Kim Barrett, Marsh Ray, Martin Bonner, Matias Capeletto, Neil Mayhew,
+ Phil Endecott, Rene Rivera, Roland Schwarz, Scott McMurray, Sebastian Redl,
+ Tomas Puverle and Yuval Ronen.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_e__tests"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests" title="Appendix E: Tests">Appendix
+ E: Tests</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">binary_stream_test</span></dt>
+<dt><span class="section">integer_endian_pack_test</span></dt>
+<dt><span class="section">integer_endian_test</span></dt>
+<dt><span class="section">integer_endian_arithmetic_operation_test</span></dt>
+<dt><span class="section">integer_endian_view_test</span></dt>
+<dt><span class="section">integer_endian_convert_test</span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_e__tests.binary_stream_test"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests.binary_stream_test" title="binary_stream_test">binary_stream_test</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ check_op
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ checl binary streams operations on builtin types
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_pack_test"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_pack_test" title="integer_endian_pack_test">integer_endian_pack_test</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ detect_endianness
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ detect endianness
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_size
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check size for different endian types
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_alignment
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check alignement for different endian types
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_representation_and_range_and_ops
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check representation and range and operations
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_test"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_test" title="integer_endian_test">integer_endian_test</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ detect_endianness
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ detect endianness
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_size
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check size for different endian types
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_alignment
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check alignement for different endian types
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_representation_and_range_and_ops
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check representation and range and operations
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_data
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check data starts at the same address
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_arithmetic_operation_test"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_arithmetic_operation_test" title="integer_endian_arithmetic_operation_test">integer_endian_arithmetic_operation_test</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ check_op
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check arithmethic operations on integer endian types
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_view_test"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_view_test" title="integer_endian_view_test">integer_endian_view_test</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ check_read
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check read access
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ check_write
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check write access
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_convert_test"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_e__tests.integer_endian_convert_test" title="integer_endian_convert_test">integer_endian_convert_test</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ check_in_place_conversion
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ check in place conversion
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.appendices.appendix_f__tickets"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.appendix_f__tickets" title="Appendix F: Tickets">Appendix
+ F: Tickets</a>
+</h3></div></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.appendices.todo"></a><a class="link" href="appendices.html#toward_boost_integer_endian.appendices.todo" title="Appendix G: Future plans">Appendix
+ G: Future plans</a>
+</h3></div></div></div>
+<a name="toward_boost_integer_endian.appendices.todo.tasks_to_do_before_review"></a><h5>
+<a name="id2969241"></a>
+ <a class="link" href="appendices.html#toward_boost_integer_endian.appendices.todo.tasks_to_do_before_review">Tasks
+ to do before review</a>
+ </h5>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Support for 'pure' endian conversion for endian unaware UDT.
+ </li>
+<li class="listitem">
+ Support for 'in place' endian conversion for ranges of endian unaware
+ types.
+ </li>
+<li class="listitem">
+ endian iterator, which will iterate across a range endian converting
+ values as necessary. It works with any type supporting the convert_to/from
+ functions.
+ </li>
+</ul></div>
+<a name="toward_boost_integer_endian.appendices.todo.for_later_releases"></a><h5>
+<a name="id2969293"></a>
+ <a class="link" href="appendices.html#toward_boost_integer_endian.appendices.todo.for_later_releases">For
+ later releases</a>
+ </h5>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ The library doesn't take advantage of special instructions on architectures
+ which natively support endian conversion. This functionality could, however,
+ be part of future releases.
+ </li></ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2006 -2009 Beman Dawes<br>Copyright &#169; 2010 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/overview.html
==============================================================================
--- (empty file)
+++ sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/overview.html 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -0,0 +1,395 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Overview</title>
+<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="up" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="prev" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="next" href="users_guide.html" title="Users'Guide">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="users_guide.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="toward_boost_integer_endian.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Motivation</span></dt>
+<dt><span class="section">Description</span></dt>
+</dl></div>
+<a name="toward_boost_integer_endian.overview.how_to_use_this_documentation"></a><h4>
+<a name="id2922582"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.how_to_use_this_documentation">How
+ to Use This Documentation</a>
+ </h4>
+<p>
+ This documentation makes use of the following naming and formatting conventions.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Code is in <code class="computeroutput"><span class="identifier">fixed</span> <span class="identifier">width</span>
+ <span class="identifier">font</span></code> and is syntax-highlighted.
+ </li>
+<li class="listitem">
+ Replaceable text that you will need to supply is in <em class="replaceable"><code>italics</code></em>.
+ </li>
+<li class="listitem">
+ Free functions are rendered in the code font followed by (), as in <code class="computeroutput"><span class="identifier">free_function</span><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+ If a name refers to a class template, it is specified like this: <code class="computeroutput"><span class="identifier">class_template</span><span class="special">&lt;&gt;</span></code>;
+ that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special">&lt;&gt;</span></code>
+ to indicate that it is a class template.
+ </li>
+<li class="listitem">
+ If a name refers to a function-like macro, it is specified like this:
+ <code class="computeroutput"><span class="identifier">MACRO</span><span class="special">()</span></code>;
+ that is, it is uppercase in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code> to indicate that it is a function-like
+ macro. Object-like macros appear without the trailing <code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+ Names that refer to <span class="emphasis"><em>concepts</em></span> in the generic programming
+ sense are specified in CamelCase.
+ </li>
+</ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ In addition, notes such as this one specify non-essential information that
+ provides additional background or rationale.
+ </p></td></tr>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ In addition, notes such as this one specify non-essential information that
+ provides additional background or rationale.
+ </p></td></tr>
+</table></div>
+<p>
+ Finally, you can mentally add the following to any code fragments in this document:
+ </p>
+<pre class="programlisting"><span class="comment">// Include all of endian files
+</span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.overview.motivation"></a><a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation" title="Motivation">Motivation</a>
+</h3></div></div></div>
+<p>
+ The original Beman's version provided through the boost::integer::endian&lt;&gt;
+ class an integer-like class that providing arithmetics operations on
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Big endian | little endian | native endian byte ordering.
+ </li>
+<li class="listitem">
+ Signed | unsigned
+ </li>
+<li class="listitem">
+ Unaligned | aligned
+ </li>
+<li class="listitem">
+ 1-8 byte (unaligned) | 2, 4, 8 byte (aligned)
+ </li>
+<li class="listitem">
+ Choice of integer value type
+ </li>
+</ul></div>
+<p>
+ This endian aware design seems to be unappropiated to work with endian unaware
+ types, but as we will see this is not completly true, as we can construct
+ on top of the Beman's design endian unaware operation. Next follows some
+ of the main critics that have been done recently.
+ </p>
+<a name="toward_boost_integer_endian.overview.motivation.intrusive_verus_non_intrusive"></a><h5>
+<a name="id2881294"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.intrusive_verus_non_intrusive">Intrusive
+ verus non-intrusive</a>
+ </h5>
+<p>
+ Endian conversion must be possible to any type even if you can't modify the
+ original source code. Many people think that originel Beman's library requires
+ the data types which need to be converted to be coded using his endian types
+ as members.
+ </p>
+<p>
+ We will see that this is not true, as the user can always use casting to
+ reinterpret a given structure on another one, as the proposed extension does
+ with the endian_views.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">endian_unaware_structure</span> <span class="special">{</span>
+ <span class="identifier">int32_t</span> <span class="identifier">a</span><span class="special">;</span>
+ <span class="identifier">int16_t</span> <span class="identifier">b</span><span class="special">;</span>
+<span class="special">};</span>
+<span class="identifier">endian_unaware_structure</span> <span class="identifier">st_a</span><span class="special">;</span>
+
+<span class="identifier">endian_unaware_structure</span> <span class="identifier">st_b</span><span class="special">;</span>
+<span class="identifier">as_endian</span><span class="special">&lt;</span><span class="identifier">native</span><span class="special">&gt;(</span><span class="identifier">st_b</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">as_endian</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">&gt;(</span><span class="identifier">st_a</span><span class="special">);</span>
+</pre>
+<a name="toward_boost_integer_endian.overview.motivation.physical_versus_logical_data"></a><h5>
+<a name="id2881488"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.physical_versus_logical_data">Physical
+ versus Logical data</a>
+ </h5>
+<p>
+ The typical use case is to use native endianness until ready to read/write
+ using wire format. It is only when ready to do I/O that there is a need to
+ account for endianness.
+ </p>
+<p>
+ Beman's original library requires two types one to specify the physical data
+ and the other representing the logical data. Many people think that this
+ means that the user has to maintain two separate structs/classes when only
+ one is needed. This could be sometimes the case, but in other cases, the
+ user will store the information elements include in the message on local
+ variables and specific contexts that don't follow the external format.
+ </p>
+<p>
+ Applications that don't separate the physical and the logical data structures
+ don't scale well as any change on the external format will mean a refactoring
+ of the whole application. Also, the wire structures cannot maintain invariants,
+ so having a separate class is often useful even if its contents are essentially
+ identical to the wire version.
+ </p>
+<p>
+ In addition a single and efficient view is only possible when the pysical
+ view can be represented by native aligned integers. But when the physical
+ view contains unaliged integers with sizes not supported by the platform,
+ the need to separate both view becomes anavoidable. Here the Beman's design
+ is the best adapted.
+ </p>
+<a name="toward_boost_integer_endian.overview.motivation.inherent_inefficient_arithmetic_operations"></a><h5>
+<a name="id2881548"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.inherent_inefficient_arithmetic_operations">Inherent
+ inefficient arithmetic operations</a>
+ </h5>
+<p>
+ The fact that the endian types provide operators gives the impression that
+ it's ok to operate on them, as these operations can potentially require two
+ endian conversions when the endianness is different.
+ </p>
+<p>
+ Some people don't agree with that design choice, as they think the operation
+ of endian conversion and operating on the data should be divorced from each
+ other. A less experienced user that you may end up not realizing what the
+ hidden costs are and use the endian aware integer-like types throughout the
+ application, paying unnecessary overheads. They prefer a library that makes
+ hard to misuse in that way; borrowing a phrase from python, "explicit
+ is better than implicit". They believe that forcing the user to do the
+ explicit endian conversion leads to better separation of concerns for the
+ application, but they don't propose any mean to force this conversion.
+ </p>
+<p>
+ The extension proposal separates the endian aware byte-holder type from the
+ one able to make arithmetic operations so the user will be forced to convert
+ for one to/from the native type, and avoid unfortunate costly atithmetic
+ operations.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">endian_aware_structure</span> <span class="special">{</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">,</span><span class="identifier">int32_t</span><span class="special">&gt;</span> <span class="identifier">a</span><span class="special">;</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">,</span><span class="identifier">int16_t</span><span class="special">&gt;</span> <span class="identifier">b</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Structure endian_aware_structure can not be used without converting to native
+ types, as endian_pack don't provide other operations than conversion.
+ </p>
+<pre class="programlisting"><span class="identifier">endian_aware_structure</span> <span class="identifier">st</span><span class="special">;</span>
+<span class="comment">// ...
+</span><span class="identifier">st</span><span class="special">.</span><span class="identifier">a</span><span class="special">=</span><span class="identifier">i</span><span class="special">;</span>
+<span class="identifier">st</span><span class="special">.</span><span class="identifier">b</span><span class="special">=</span><span class="identifier">j</span><span class="special">;</span>
+</pre>
+<p>
+ But don't removes the inefficient and endian safe class, as less demanding
+ applications would benefit from the safe and transparent approach.
+ </p>
+<a name="toward_boost_integer_endian.overview.motivation.in_place_conversion"></a><h5>
+<a name="id2932442"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.in_place_conversion">In-place
+ conversion</a>
+ </h5>
+<p>
+ Other contexts force the user to make in place conversions. While this could
+ be dangerous, there are context on which a funtional conversion is not possible,
+ mainly because the duplicated space could not be an option. These in-place
+ conversions are only possible for aligned endian unaware types.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">endian_unaware_structure</span> <span class="special">{</span>
+ <span class="identifier">int32_t</span> <span class="identifier">a</span><span class="special">;</span>
+ <span class="identifier">int16_t</span> <span class="identifier">b</span><span class="special">;</span>
+<span class="special">};</span>
+<span class="identifier">endian_unaware_structure</span> <span class="identifier">st</span><span class="special">;</span>
+
+<span class="identifier">as_endian</span><span class="special">&lt;</span><span class="identifier">native</span><span class="special">&gt;(</span><span class="identifier">st</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">as_endian</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">&gt;(</span><span class="identifier">st</span><span class="special">);</span>
+</pre>
+<p>
+ The fact that some context need this in-place conversion doesn't mean that
+ every application should use this approach.
+ </p>
+<a name="toward_boost_integer_endian.overview.motivation.udt_endianness"></a><h5>
+<a name="id2932602"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.udt_endianness">UDT
+ endianness</a>
+ </h5>
+<p>
+ boost::integer::endian class didn't accept a UDT. We have updated the library
+ so now UDT can be used for endian aligned types.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">UserMessage</span> <span class="special">{</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="special">&gt;</span> <span class="identifier">timestamp</span><span class="special">;</span>
+ <span class="identifier">ulittle32_pt</span> <span class="identifier">aircraft_id</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">Position</span> <span class="special">{</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">length</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">x</span><span class="special">;</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">length</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">y</span><span class="special">;</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">length</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">z</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">position</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">Attitude</span> <span class="special">{</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">plane_angle</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least8_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">heading</span><span class="special">;</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">plane_angle</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least8_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">pitch</span><span class="special">;</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">plane_angle</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least8_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">roll</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">attitude</span><span class="special">;</span>
+<span class="special">};</span> <span class="comment">// UserMessage
+</span></pre>
+<a name="toward_boost_integer_endian.overview.motivation.mixed_endianness"></a><h5>
+<a name="id2933232"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.mixed_endianness">Mixed
+ endianness</a>
+ </h5>
+<p>
+ Sometimes we need to deal with messages with mixed endianness. A functional
+ approach means the programmer has to "know" which endianess the
+ data he wants to convert has.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">UdpHeader</span> <span class="special">{</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">source_port</span><span class="special">;</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">destination_port</span><span class="special">;</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">length</span><span class="special">;</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">checksum</span><span class="special">;</span>
+<span class="special">};</span> <span class="comment">// UdpHeader
+</span>
+<span class="keyword">struct</span> <span class="identifier">Packet</span> <span class="special">{</span>
+ <span class="identifier">internet</span><span class="special">::</span><span class="identifier">UdpHeader</span> <span class="identifier">udpHeader</span><span class="special">;</span>
+ <span class="identifier">UserMessage</span> <span class="identifier">userMessage</span><span class="special">;</span>
+<span class="special">};</span> <span class="comment">// Packet
+</span></pre>
+<a name="toward_boost_integer_endian.overview.motivation.floating_point"></a><h5>
+<a name="id2933409"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.floating_point">Floating
+ point</a>
+ </h5>
+<p>
+ From my understanding floating point types are not only concerned by endianness,
+ but also by a multitude of standard on not standard formats.
+ </p>
+<a name="toward_boost_integer_endian.overview.motivation.conclusion"></a><h5>
+<a name="id2933434"></a>
+ <a class="link" href="overview.html#toward_boost_integer_endian.overview.motivation.conclusion">Conclusion</a>
+ </h5>
+<p>
+ The library must support applications needing to work safely with endian
+ aware types and efficiently with in place endian conversions.
+ </p>
+<p>
+ Conversions between native and big/little endian formats must be simple.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.overview.description"></a><a class="link" href="overview.html#toward_boost_integer_endian.overview.description" title="Description">Description</a>
+</h3></div></div></div>
+<p>
+ This is an extension of the Beman's Boost.Integer.Endian, which was able
+ to work with endian aware types, used to convert between types with different
+ endian or even to carry on with arithmetic operations, by spliting the endian
+ part from integer part and by adding support for aligned endian unaware types.
+ </p>
+<p>
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span> provides:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<p class="simpara">
+ Endian packs
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ Big endian | little endian | native endian byte ordering.
+ </li>
+<li class="listitem">
+ Signed | unsigned
+ </li>
+<li class="listitem">
+ Unaligned | aligned
+ </li>
+<li class="listitem">
+ 1-8 byte (unaligned) | 2, 4, 8 byte (aligned)
+ </li>
+<li class="listitem">
+ Choice of integer value type
+ </li>
+</ul></div>
+</li>
+<li class="listitem">
+ Endian integers with the whole set of arithmetics operators.
+ </li>
+<li class="listitem">
+ Operators &lt;= and =&gt; for unformatted binary (as opposed to formatted
+ character) stream insertion and extraction of built-in, std::string types
+ and of endian types.
+ </li>
+<li class="listitem">
+ Views of aligned endian unaware integer types as endian packs or endian
+ integers so we can make endian conversion.
+ </li>
+<li class="listitem">
+<p class="simpara">
+ Generic in place conversion between different endian formats.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ Very simple interface: convert_to/from&lt;endiannes domain&gt;(),
+ </li>
+<li class="listitem">
+ Support for built-in and user-defined data types view as fusion sequences.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2006 -2009 Beman Dawes<br>Copyright &#169; 2010 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="users_guide.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/reference.html
==============================================================================
--- (empty file)
+++ sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/reference.html 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -0,0 +1,1403 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="up" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="prev" href="users_guide.html" title="Users'Guide">
+<link rel="next" href="appendices.html" title="Appendices">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="users_guide.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="appendices.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="toward_boost_integer_endian.reference"></a><a class="link" href="reference.html" title="Reference">Reference</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.binary_stream_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endiannes</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_big">Class
+ <code class="computeroutput"><span class="identifier">big</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_little">Class
+ <code class="computeroutput"><span class="identifier">little</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_middle">Class
+ <code class="computeroutput"><span class="identifier">middle</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_mixed">Class
+ <code class="computeroutput"><span class="identifier">mixed</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_native">Class
+ <code class="computeroutput"><span class="identifier">native</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.endian_domain_map_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">domain_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.endian_domain_map_hpp.domain_map">Meta
+ Function <code class="computeroutput"><span class="identifier">domain_map</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack">Template
+ class <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.typedefs">Common
+ typedefs</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian">Template
+ class <code class="computeroutput"><span class="identifier">endian</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.typedefs">Common
+ typedefs</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_binary_stream_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp.integer_endian_type">Meta
+ Function <code class="computeroutput"><span class="identifier">endian_type</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view">Template
+ class <code class="computeroutput"><span class="identifier">endian_view</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_endian">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_endian</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_little">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_little</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_big">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_big</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to_from">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_to_from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_from">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.to">Class
+ Template <code class="computeroutput"><span class="identifier">to</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.from">Class
+ Template <code class="computeroutput"><span class="identifier">from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_to">Class
+ Template <code class="computeroutput"><span class="identifier">is_to</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_from">Class
+ Template <code class="computeroutput"><span class="identifier">is_from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.binary_stream_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.binary_stream_hpp" title="Header &lt;boost/binary_stream.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<p>
+ Header &lt;boost/binary_stream.hpp&gt; provides operators <code class="computeroutput"><span class="special">&lt;=</span></code>
+ and <code class="computeroutput"><span class="special">=&gt;</span></code> for unformatted binary
+ (as opposed to formatted character) stream insertion and extraction of built-in
+ and std::string types.
+ </p>
+<a name="toward_boost_integer_endian.reference.binary_stream_hpp.synopsis"></a><h5>
+<a name="id2942695"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.binary_stream_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+
+ <span class="comment">// built-in types ------------------------------------------------------------------//
+</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">short</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">short</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">long</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">long</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">long</span> <span class="keyword">long</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">long</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">float</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">float</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">double</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">long</span> <span class="keyword">double</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&amp;</span> <span class="identifier">c</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">signed</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">signed</span> <span class="keyword">char</span><span class="special">&amp;</span> <span class="identifier">c</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">&amp;</span> <span class="identifier">c</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">wchar_t</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="keyword">wchar_t</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="comment">// strings -------------------------------------------------------------------------//
+</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">signed</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span>
+
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_NO_CWCHAR</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_NO_STD_WSTRING</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&lt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">&gt;=(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="preprocessor">#endif</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Omission of bool and void* is deliberate; any semantics would be questionable
+ </p></td></tr>
+</table></div>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Note the asymmetry between output and input; a string with embedded nulls
+ will be output with the embedded nulls, but input will stop at the first
+ null. So it probably isn't a good idea to use these functions for strings
+ with nulls.
+ </p></td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endianness_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp" title="Header &lt;boost/integer/endian/endiannes.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endiannes</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_big">Class
+ <code class="computeroutput"><span class="identifier">big</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_little">Class
+ <code class="computeroutput"><span class="identifier">little</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_middle">Class
+ <code class="computeroutput"><span class="identifier">middle</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_mixed">Class
+ <code class="computeroutput"><span class="identifier">mixed</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_native">Class
+ <code class="computeroutput"><span class="identifier">native</span></code></a></span></dt>
+</dl></div>
+<p>
+ Header &lt;boost/endian/endian/endianness.hpp&gt; provides the endianness
+ tags.
+ </p>
+<a name="toward_boost_integer_endian.reference.integer_endianness_hpp.synopsis"></a><h5>
+<a name="id2945850"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">endianness</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">big</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">little</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">middle</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">mixed</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">platform</span> <span class="identifier">dependent</span><span class="special">&gt;</span> <span class="identifier">native</span> <span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endianness_hpp.endian_big"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_big" title="Class big">Class
+ <code class="computeroutput"><span class="identifier">big</span></code></a>
+</h4></div></div></div>
+<p>
+ Big endian tag.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">big</span> <span class="special">{};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endianness_hpp.endian_little"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_little" title="Class little">Class
+ <code class="computeroutput"><span class="identifier">little</span></code></a>
+</h4></div></div></div>
+<p>
+ Little endian tag.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">little</span> <span class="special">{};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endianness_hpp.endian_middle"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_middle" title="Class middle">Class
+ <code class="computeroutput"><span class="identifier">middle</span></code></a>
+</h4></div></div></div>
+<p>
+ Middle endian tag.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">middle</span> <span class="special">{};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endianness_hpp.endian_mixed"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_mixed" title="Class mixed">Class
+ <code class="computeroutput"><span class="identifier">mixed</span></code></a>
+</h4></div></div></div>
+<p>
+ Mixed endian tag.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">mixed</span> <span class="special">{};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endianness_hpp.endian_native"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endianness_hpp.endian_native" title="Class native">Class
+ <code class="computeroutput"><span class="identifier">native</span></code></a>
+</h4></div></div></div>
+<p>
+ Native endian tag.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">platform</span> <span class="identifier">dependent</span><span class="special">&gt;</span> <span class="identifier">native</span> <span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.endian_domain_map_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.endian_domain_map_hpp" title="Header &lt;boost/integer/endian/domain_map.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">domain_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.endian_domain_map_hpp.domain_map">Meta
+ Function <code class="computeroutput"><span class="identifier">domain_map</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></div>
+<p>
+ This file contains the default implementation ofr the <code class="computeroutput"><span class="identifier">domain_map</span></code>
+ metafunction.
+ </p>
+<a name="toward_boost_integer_endian.reference.endian_domain_map_hpp.synopsis"></a><h5>
+<a name="id2946414"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.endian_domain_map_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">endian</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Domain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">domain_map</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.endian_domain_map_hpp.domain_map"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.endian_domain_map_hpp.domain_map" title="Meta Function domain_map&lt;&gt;">Meta
+ Function <code class="computeroutput"><span class="identifier">domain_map</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Domain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">domain_map</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<p class="simpara">
+ <span class="bold"><strong>Requires:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem">
+ <code class="computeroutput"><span class="identifier">Domain</span></code> any class.
+ Can be also <code class="computeroutput"><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span></code>
+ or <code class="computeroutput"><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span></code>.
+ </li></ul></div>
+</li>
+<li class="listitem">
+ <span class="bold"><strong>Result:</strong></span> The member typedef <code class="computeroutput"><span class="identifier">type</span></code> names a mpl tree of sequence
+ of <code class="computeroutput"><span class="identifier">endianness</span></code> types
+ as view from the point of view of the <code class="computeroutput"><span class="identifier">Domain</span></code>.
+ The default definition is a mpl tree having as leaves the <code class="computeroutput"><span class="identifier">Domain</span></code> class for <code class="computeroutput"><span class="identifier">T</span></code>
+ fundamental types, and fusion sequences.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Example:</strong></span>
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">domain_map</span><span class="special">&lt;</span><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="special">==</span> <span class="keyword">true</span>
+
+<span class="keyword">struct</span> <span class="identifier">ifA</span> <span class="special">{};</span>
+</pre>
+<p>
+ The user needs to specialize this metafunction for specific domains.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp" title="Header &lt;boost/integer/endian/endian_pack.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack">Template
+ class <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endian">Default
+ Contructor <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endianT">Contructor
+ from value_type <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.assignment">Assignment
+ Operator from value_type <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.conversion">Conversion
+ Operator <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.data">Member
+ Function <code class="computeroutput"><span class="identifier">data</span><span class="special">()</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.typedefs">Common
+ typedefs</a></span></dt>
+</dl></div>
+<p>
+ This file contains the core class template of <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span>.
+ Provides byte-holder binary types with explicit control over byte order,
+ value type, size, and alignment. Typedefs provide easy-to-use names for common
+ configurations.
+ </p>
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.synopsis"></a><h5>
+<a name="id2947047"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">integer</span> <span class="special">{</span>
+ <span class="identifier">BOOST_SCOPED_ENUM_START</span><span class="special">(</span><span class="identifier">alignment</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">unaligned</span><span class="special">,</span> <span class="identifier">aligned</span> <span class="special">};</span> <span class="identifier">BOOST_SCOPED_ENUM_END</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bits</span><span class="special">=</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)*</span><span class="number">8</span><span class="special">,</span>
+ <span class="identifier">BOOST_SCOPED_ENUM</span><span class="special">(</span><span class="identifier">alignment</span><span class="special">)</span> <span class="identifier">A</span> <span class="special">=</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span>
+ <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">endian_pack</span><span class="special">;</span>
+
+ <span class="comment">// unaligned big endian_pack signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big8_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big24_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big40_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big48_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big56_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big64_pt</span><span class="special">;</span>
+
+ <span class="comment">// unaligned big endian_pack unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig8_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig24_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig40_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig48_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig56_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig64_pt</span><span class="special">;</span>
+
+ <span class="comment">// unaligned little endian_pack signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little8_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little24_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little40_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little48_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little56_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little64_pt</span><span class="special">;</span>
+
+ <span class="comment">// unaligned little endian_pack unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle8_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle24_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle40_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle48_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle56_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle64_pt</span><span class="special">;</span>
+
+ <span class="comment">// unaligned native endian_pack signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native8_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native24_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native40_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native48_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native56_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native64_pt</span><span class="special">;</span>
+
+ <span class="comment">// unaligned native endian_pack unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative8_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative24_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative40_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative48_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative56_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative64_pt</span><span class="special">;</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_HAS_INT16_T</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_HAS_INT32_T</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_HAS_INT64_T</span>
+
+ <span class="comment">// These types only present if platform has exact size integers:
+</span> <span class="comment">// aligned big endian_pack signed integer types
+</span> <span class="comment">// aligned big endian_pack unsigned integer types
+</span> <span class="comment">// aligned little endian_pack signed integer types
+</span> <span class="comment">// aligned little endian_pack unsigned integer types
+</span>
+ <span class="comment">// aligned native endian_pack typedefs are not provided because
+</span> <span class="comment">// &lt;cstdint&gt; types are superior for this use case
+</span>
+<span class="preprocessor"># if</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_HAS_INT16_T</span><span class="special">)</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_big16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ubig16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_little16_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ulittle16_pt</span><span class="special">;</span>
+<span class="preprocessor"># endif</span>
+
+<span class="preprocessor"># if</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_HAS_INT32_T</span><span class="special">)</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_big32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ubig32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_little32_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ulittle32_pt</span><span class="special">;</span>
+<span class="preprocessor"># endif</span>
+
+<span class="preprocessor"># if</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_HAS_INT64_T</span><span class="special">)</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_big64_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ubig64_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_little64_pt</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian_pack</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ulittle64_pt</span><span class="special">;</span>
+<span class="preprocessor"># endif</span>
+
+<span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack" title="Template class endian_pack&lt;&gt;">Template
+ class <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endian">Default
+ Contructor <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endianT">Contructor
+ from value_type <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.assignment">Assignment
+ Operator from value_type <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.conversion">Conversion
+ Operator <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.data">Member
+ Function <code class="computeroutput"><span class="identifier">data</span><span class="special">()</span></code></a></span></dt>
+</dl></div>
+<p>
+ An <code class="computeroutput"><span class="identifier">endian_pack</span></code> is a byte-holder
+ with user-specified endianness, value type, size, and alignment.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bits</span><span class="special">=</span><span class="number">8</span><span class="special">*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">),</span>
+ <span class="identifier">alignment</span> <span class="identifier">A</span> <span class="special">=</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">endian_pack</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">E</span> <span class="identifier">endian_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">width</span> <span class="special">=</span> <span class="identifier">n_bits</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">alignment</span> <span class="identifier">alignment_value</span> <span class="special">=</span> <span class="identifier">A</span><span class="special">;</span>
+
+ <span class="identifier">endian_pack</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">default</span><span class="special">;</span> <span class="comment">// = default replaced by {} on C++03
+</span> <span class="keyword">explicit</span> <span class="identifier">endian_pack</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">endian_pack</span> <span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<p class="simpara">
+ <span class="bold"><strong>Requires:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">E</span></code> is one of <code class="computeroutput"><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span></code> or <code class="computeroutput"><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span></code>.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">T</span></code> must be a POD
+ with value semantics.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">nbits</span></code> is a multiple
+ of <code class="computeroutput"><span class="number">8</span></code>
+ </li>
+<li class="listitem">
+ If <code class="computeroutput"><span class="identifier">A</span></code> is <code class="computeroutput"><span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span></code> then <code class="computeroutput"><span class="identifier">nbits</span></code>
+ must be equal to <code class="computeroutput"><span class="number">8</span><span class="special">*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code>
+ </li>
+</ul></div>
+</li></ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ if BOOST_ENDIAN_FORCE_PODNESS is defined &amp;&amp; C++0x POD's are not
+ available then these two constructors will not be present
+ </p></td></tr>
+</table></div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endian"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endian" title="Default Contructor endian_pack()">Default
+ Contructor <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">endian_pack</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">default</span><span class="special">;</span> <span class="comment">// C++03: endian(){}
+</span></pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Effects:</strong></span> Constructs an object of
+ type <code class="computeroutput"><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">n_bits</span><span class="special">,</span>
+ <span class="identifier">A</span><span class="special">&gt;</span></code>.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endianT"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.endianT" title="Contructor from value_type endian_pack(T)">Contructor
+ from value_type <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">endian_pack</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Effects:</strong></span> Constructs an object of
+ type <code class="computeroutput"><span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">n_bits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span></code>.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Postcondition:</strong></span> <code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">==</span> <span class="identifier">v</span></code>,
+ where <code class="computeroutput"><span class="identifier">x</span></code> is the constructed
+ object.
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.assignment"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.assignment" title="Assignment Operator from value_type operator=(T)">Assignment
+ Operator from value_type <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span><span class="special">)</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">endian</span> <span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Postcondition:</strong></span> <code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">==</span> <span class="identifier">v</span></code>,
+ where <code class="computeroutput"><span class="identifier">x</span></code> is the constructed
+ object.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.conversion"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.conversion" title="Conversion Operator operator T()">Conversion
+ Operator <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> The current value stored
+ in <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>,
+ converted to <code class="computeroutput"><span class="identifier">value_type</span></code>.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.data"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.endian_pack.data" title="Member Function data()">Member
+ Function <code class="computeroutput"><span class="identifier">data</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> The current value stored
+ in <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>,
+ converted to <code class="computeroutput"><span class="identifier">value_type</span></code>.
+ </li></ul></div>
+</div>
+</div>
+<div class="section"><div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_pack_hpp.typedefs"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_pack_hpp.typedefs" title="Common typedefs">Common
+ typedefs</a>
+</h4></div></div></div></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp" title="Header &lt;boost/integer/endian/endian.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian">Template
+ class <code class="computeroutput"><span class="identifier">endian</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.endian">Default
+ Contructor <code class="computeroutput"><span class="identifier">endian</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.endianT">Contructor
+ from value_type <code class="computeroutput"><span class="identifier">endian</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.assignment">Assignment
+ Operator from value_type <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.conversion">Conversion
+ Operator <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.data">Member
+ Function <code class="computeroutput"><span class="identifier">data</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.other">Other
+ operators </a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.typedefs">Common
+ typedefs</a></span></dt>
+</dl></div>
+<p>
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ provides integer-like byte-holder binary types with explicit control over
+ byte order, value type, size, and alignment. Typedefs provide easy-to-use
+ names for common configurations.
+ </p>
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.synopsis"></a><h5>
+<a name="id2954325"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">integer</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bits</span><span class="special">,</span>
+ <span class="identifier">alignment</span> <span class="identifier">A</span> <span class="special">=</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">endian</span><span class="special">;</span>
+
+ <span class="comment">// unaligned big endian signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big8_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big24_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big40_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big48_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big56_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">big64_t</span><span class="special">;</span>
+
+ <span class="comment">// unaligned big endian unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig8_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig24_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig40_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig48_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig56_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ubig64_t</span><span class="special">;</span>
+
+ <span class="comment">// unaligned little endian signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little8_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little24_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little40_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little48_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little56_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">little64_t</span><span class="special">;</span>
+
+ <span class="comment">// unaligned little endian unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle8_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle24_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle40_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle48_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle56_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">ulittle64_t</span><span class="special">;</span>
+
+ <span class="comment">// unaligned native endian signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native8_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native24_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native40_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native48_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native56_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">int_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">native64_t</span><span class="special">;</span>
+
+ <span class="comment">// unaligned native endian unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least8_t</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative8_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative24_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">40</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative40_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">48</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative48_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">56</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative56_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">uint_least64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">unaligned</span> <span class="special">&gt;</span> <span class="identifier">unative64_t</span><span class="special">;</span>
+
+ <span class="comment">// These types only present if platform has exact size integers:
+</span>
+ <span class="comment">// aligned big endian signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_big16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_big32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_big64_t</span><span class="special">;</span>
+
+ <span class="comment">// aligned big endian unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ubig16_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ubig32_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">uint64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ubig64_t</span><span class="special">;</span>
+
+ <span class="comment">// aligned little endian signed integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_little2_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_little4_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_little8_t</span><span class="special">;</span>
+
+ <span class="comment">// aligned little endian unsigned integer types
+</span> <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint16_t</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ulittle2_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="number">32</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ulittle4_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">endian</span><span class="special">&lt;</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">uint64_t</span><span class="special">,</span> <span class="number">64</span><span class="special">,</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span> <span class="special">&gt;</span> <span class="identifier">aligned_ulittle8_t</span><span class="special">;</span>
+
+
+ <span class="comment">// aligned native endian typedefs are not provided because
+</span> <span class="comment">// &lt;cstdint&gt; types are superior for this use case
+</span>
+<span class="special">}</span> <span class="comment">// namespace integer
+</span><span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.endian"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian" title="Template class endian&lt;&gt;">Template
+ class <code class="computeroutput"><span class="identifier">endian</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.endian">Default
+ Contructor <code class="computeroutput"><span class="identifier">endian</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.endianT">Contructor
+ from value_type <code class="computeroutput"><span class="identifier">endian</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.assignment">Assignment
+ Operator from value_type <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.conversion">Conversion
+ Operator <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.data">Member
+ Function <code class="computeroutput"><span class="identifier">data</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.other">Other
+ operators </a></span></dt>
+</dl></div>
+<p>
+ An endian integer is an integer byte-holder with user-specified endianness,
+ value type, size, and alignment. The usual operations on integers are supplied.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bits</span><span class="special">=</span><span class="number">8</span><span class="special">*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">),</span>
+ <span class="identifier">alignment</span> <span class="identifier">A</span> <span class="special">=</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">endian</span> <span class="special">:</span> <span class="identifier">integer_cover_operators</span><span class="special">&lt;</span> <span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">n_bits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;,</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">E</span> <span class="identifier">endian_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">width</span> <span class="special">=</span> <span class="identifier">n_bits</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">alignment</span> <span class="identifier">alignment_value</span> <span class="special">=</span> <span class="identifier">A</span><span class="special">;</span>
+
+ <span class="identifier">endian</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">default</span><span class="special">;</span> <span class="comment">// = default replaced by {} on C++03
+</span> <span class="keyword">explicit</span> <span class="identifier">endian</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">endian</span> <span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<p class="simpara">
+ <span class="bold"><strong>Requires:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">E</span></code> is one of <code class="computeroutput"><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span></code> or <code class="computeroutput"><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span></code>.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">T</span></code> must be a POD
+ with value semantics.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">nbits</span></code> is a multiple
+ of <code class="computeroutput"><span class="number">8</span></code>
+ </li>
+<li class="listitem">
+ If <code class="computeroutput"><span class="identifier">A</span></code> is <code class="computeroutput"><span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span></code> then <code class="computeroutput"><span class="identifier">nbits</span></code>
+ must be equal to <code class="computeroutput"><span class="number">8</span><span class="special">*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code>
+ </li>
+</ul></div>
+</li></ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ if BOOST_ENDIAN_FORCE_PODNESS is defined &amp;&amp; C++0x POD's are not
+ available then these two constructors will not be present
+ </p></td></tr>
+</table></div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.endian.endian"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.endian" title="Default Contructor endian()">Default
+ Contructor <code class="computeroutput"><span class="identifier">endian</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">endian</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">default</span><span class="special">;</span> <span class="comment">// C++03: endian(){}
+</span></pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Effects:</strong></span> Constructs an object of
+ type <code class="computeroutput"><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">n_bits</span><span class="special">,</span>
+ <span class="identifier">A</span><span class="special">&gt;</span></code>.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.endian.endianT"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.endianT" title="Contructor from value_type endian(T)">Contructor
+ from value_type <code class="computeroutput"><span class="identifier">endian</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">endian</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Effects:</strong></span> Constructs an object of
+ type <code class="computeroutput"><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">n_bits</span><span class="special">,</span>
+ <span class="identifier">A</span><span class="special">&gt;</span></code>.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Postcondition:</strong></span> <code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">==</span> <span class="identifier">v</span></code>,
+ where <code class="computeroutput"><span class="identifier">x</span></code> is the constructed
+ object.
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.endian.assignment"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.assignment" title="Assignment Operator from value_type operator=(T)">Assignment
+ Operator from value_type <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span><span class="special">)</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">endian</span> <span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Postcondition:</strong></span> <code class="computeroutput"><span class="identifier">value_type</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">v</span></code>.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.endian.conversion"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.conversion" title="Conversion Operator operator T()">Conversion
+ Operator <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> The current value stored
+ in <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>,
+ converted to <code class="computeroutput"><span class="identifier">value_type</span></code>.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.endian.data"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.data" title="Member Function data()">Member
+ Function <code class="computeroutput"><span class="identifier">data</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> The current value stored
+ in <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>,
+ converted to <code class="computeroutput"><span class="identifier">value_type</span></code>.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.endian.other"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.endian.other" title="Other operators">Other
+ operators </a>
+</h5></div></div></div>
+<p>
+ Other operators on endian objects are forwarded to the equivalent operator
+ on <code class="computeroutput"><span class="identifier">value_type</span></code>.
+ </p>
+</div>
+</div>
+<div class="section"><div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_hpp.typedefs"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_hpp.typedefs" title="Common typedefs">Common
+ typedefs</a>
+</h4></div></div></div></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_binary_stream_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_binary_stream_hpp" title="Header &lt;boost/integer/endian/endian_binary_stream.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<p>
+ Header &lt;boost/integer/endian/endian_binary_stream.hpp&gt; provides operators
+ <code class="computeroutput"><span class="special">&lt;=</span></code> and <code class="computeroutput"><span class="special">=&gt;</span></code>
+ for unformatted binary (as opposed to formatted character) stream insertion
+ and extraction of endian types.
+ </p>
+<a name="toward_boost_integer_endian.reference.integer_endian_binary_stream_hpp.synopsis"></a><h5>
+<a name="id2961452"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_binary_stream_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">integer</span>
+ <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_endian</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span> <span class="special">};</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bits</span><span class="special">,</span> <span class="identifier">alignment</span> <span class="identifier">A</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_endian</span><span class="special">&lt;</span><span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">n_bits</span><span class="special">,</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span> <span class="special">};</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bits</span><span class="special">,</span> <span class="identifier">alignment</span> <span class="identifier">A</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_endian</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">n_bits</span><span class="special">,</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span> <span class="special">};</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Endian</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="identifier">is_endian</span><span class="special">&lt;</span><span class="identifier">Endian</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">&lt;=(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Endian</span> <span class="special">&amp;</span> <span class="identifier">e</span> <span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Endian</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="identifier">is_endian</span><span class="special">&lt;</span><span class="identifier">Endian</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span> <span class="special">&amp;</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">&gt;=(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span> <span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="identifier">Endian</span> <span class="special">&amp;</span> <span class="identifier">e</span> <span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_type_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp" title="Header &lt;boost/integer/endian/endian_type.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp.integer_endian_type">Meta
+ Function <code class="computeroutput"><span class="identifier">endian_type</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></div>
+<a name="toward_boost_integer_endian.reference.integer_endian_type_hpp.synopsis"></a><h5>
+<a name="id2962418"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">integer</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">endian_type</span><span class="special">;</span>
+<span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_type_hpp.integer_endian_type"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp.integer_endian_type" title="Meta Function endian_type&lt;&gt;">Meta
+ Function <code class="computeroutput"><span class="identifier">endian_type</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Domain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">endian_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ The member typedef <code class="computeroutput"><span class="identifier">type</span></code>
+ names one of the <code class="computeroutput"><span class="identifier">endianness</span></code>
+ types <code class="computeroutput"><span class="identifier">big</span></code>, <code class="computeroutput"><span class="identifier">little</span></code> or <code class="computeroutput"><span class="identifier">mixed</span></code>.
+ If all the leaves of the type T are of the same endianness type is this
+ endiannes, otherwise it is <code class="computeroutput"><span class="identifier">mixed</span></code>.
+ </p>
+<p>
+ The default behavior works for all the endian aware types, fundamental
+ types and any type that is a fusion sequence.
+ </p>
+<p>
+ The user can specialize this metafunction for specific clases.
+ </p>
+<a name="toward_boost_integer_endian.reference.integer_endian_type_hpp.integer_endian_type.example"></a><h6>
+<a name="id2962736"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_type_hpp.integer_endian_type.example">Example</a>
+ </h6>
+<pre class="programlisting"><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">endian_type</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="special">==</span> <span class="keyword">true</span>
+<span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">endian_type</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="special">==</span> <span class="keyword">true</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp" title="Header &lt;boost/integer/endian/endian_view.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view">Template
+ class <code class="computeroutput"><span class="identifier">endian_view</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.endian_view">Constructor
+ <code class="computeroutput"><span class="identifier">endian_view</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.operator_value_type">Conversion
+ <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">value_type</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement">Assignement
+ <code class="computeroutput"><span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">endian_view</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement2">Assignement
+ from different endianness<code class="computeroutput"><span class="keyword">operator</span>
+ <span class="special">=(</span><span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">Endian2</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement_value_type">Assignement
+ from value_type <code class="computeroutput"><span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">value_type</span><span class="special">)</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_endian">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_endian</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_little">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_little</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_big">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_big</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<p>
+ This file provides the <code class="computeroutput"><span class="identifier">endian_view</span><span class="special">&lt;&gt;</span></code> class template as well as some factory
+ helper functions.
+ </p>
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.synopsis"></a><h5>
+<a name="id2963041"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">integer</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">endian_view</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as_endian</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as_little</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as_big</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+
+
+<span class="special">}</span> <span class="comment">// namespace integer
+</span><span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view" title="Template class endian_view&lt;&gt;">Template
+ class <code class="computeroutput"><span class="identifier">endian_view</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.endian_view">Constructor
+ <code class="computeroutput"><span class="identifier">endian_view</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.operator_value_type">Conversion
+ <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">value_type</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement">Assignement
+ <code class="computeroutput"><span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">endian_view</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement2">Assignement
+ from different endianness<code class="computeroutput"><span class="keyword">operator</span>
+ <span class="special">=(</span><span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">Endian2</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement_value_type">Assignement
+ from value_type <code class="computeroutput"><span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">value_type</span><span class="special">)</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">endian_view</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="identifier">endian_view</span><span class="special">()=</span><span class="keyword">delete</span><span class="special">;</span>
+ <span class="identifier">endian_view</span><span class="special">(</span><span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">ref</span><span class="special">);</span>
+ <span class="keyword">operator</span> <span class="identifier">value_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">endian_view</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">value_type</span> <span class="identifier">val</span><span class="special">);</span>
+ <span class="identifier">endian_view</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">endian_view</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian2</span> <span class="special">&gt;</span>
+ <span class="identifier">endian_view</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">Endian2</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="special">{</span>
+<span class="special">};</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.endian_view"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.endian_view" title="Constructor endian_view">Constructor
+ <code class="computeroutput"><span class="identifier">endian_view</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">endian_view</span><span class="special">(</span><span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">ref</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Effects:</strong></span> Constructs an object of
+ type <code class="computeroutput"><span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">n_bits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span></code>.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.operator_value_type"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.operator_value_type" title="Conversion operator value_type()">Conversion
+ <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">value_type</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">operator</span> <span class="identifier">value_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> The converted <code class="computeroutput"><span class="identifier">value_type</span></code> of the referenced type
+ as it was seen as an endian aware type.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement" title="Assignement operator =(endian_view const&amp; )">Assignement
+ <code class="computeroutput"><span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">endian_view</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">)</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">endian_view</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">endian_view</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Postcondition:</strong></span> <code class="computeroutput"><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">ref_</span>
+ <span class="special">==</span> <span class="identifier">rhs</span><span class="special">.</span><span class="identifier">ref_</span></code>.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement2"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement2" title="Assignement from different endiannessoperator =(endian_view&lt;Endian2,T&gt; const&amp; )">Assignement
+ from different endianness<code class="computeroutput"><span class="keyword">operator</span>
+ <span class="special">=(</span><span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">Endian2</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="special">)</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian2</span> <span class="special">&gt;</span>
+<span class="identifier">endian_view</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">Endian2</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="special">{</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Postcondition:</strong></span> <code class="computeroutput"><span class="identifier">value_type</span><span class="special">(</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">ref_</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">value_type</span><span class="special">(</span><span class="identifier">rhs</span><span class="special">.</span><span class="identifier">ref_</span><span class="special">)</span></code>.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement_value_type"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.endian_view.assignement_value_type" title="Assignement from value_type operator =(value_type)">Assignement
+ from value_type <code class="computeroutput"><span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">value_type</span><span class="special">)</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">endian_view</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">value_type</span> <span class="identifier">val</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="bold"><strong>Postcondition:</strong></span> <code class="computeroutput"><span class="identifier">value_type</span><span class="special">(</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">ref_</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">v</span></code>.
+ </li>
+<li class="listitem">
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+</ul></div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.as_endian"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_endian" title="Non-Member Function Template as_endian&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_endian</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as_endian</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.as"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as" title="Non-Member Function Template as&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">::</span><span class="identifier">native</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.as_little"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_little" title="Non-Member Function Template as_little&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_little</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">::</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as_little</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_view_hpp.as_big"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_view_hpp.as_big" title="Non-Member Function Template as_big&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">as_big</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">endian_view</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">&lt;</span><span class="identifier">endian</span><span class="special">::</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">as_big</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp" title="Header &lt;boost/integer/endian/endian_conversion.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to_from">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_to_from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_from">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.to">Class
+ Template <code class="computeroutput"><span class="identifier">to</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.from">Class
+ Template <code class="computeroutput"><span class="identifier">from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_to">Class
+ Template <code class="computeroutput"><span class="identifier">is_to</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_from">Class
+ Template <code class="computeroutput"><span class="identifier">is_from</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.synopsis"></a><h5>
+<a name="id2965574"></a>
+ <a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">integer</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TargetDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">SourceDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">convert_to_from</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SourceDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">convert_from</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TargetDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">to</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">from</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_to</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_from</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Endian2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">convert</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+
+
+<span class="special">}</span> <span class="comment">// namespace integer
+</span><span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to_from"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to_from" title="Non-Member Function Template convert_to_from&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_to_from</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TargetDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">SourceDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">convert_to_from</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_from"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_from" title="Non-Member Function Template convert_from&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_from</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SourceDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">convert_from</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert_to" title="Non-Member Function Template convert_to&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TargetDomain</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.to"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.to" title="Class Template to&lt;&gt;">Class
+ Template <code class="computeroutput"><span class="identifier">to</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">to</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">Endian</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.from"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.from" title="Class Template from&lt;&gt;">Class
+ Template <code class="computeroutput"><span class="identifier">from</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">from</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">Endian</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_to"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_to" title="Class Template is_to&lt;&gt;">Class
+ Template <code class="computeroutput"><span class="identifier">is_to</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_to</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="special">{};</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_to</span><span class="special">&lt;</span> <span class="identifier">to</span><span class="special">&lt;</span><span class="identifier">Endian</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_from"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.is_from" title="Class Template is_from&lt;&gt;">Class
+ Template <code class="computeroutput"><span class="identifier">is_from</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_from</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="special">{};</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_from</span><span class="special">&lt;</span> <span class="identifier">from</span><span class="special">&lt;</span><span class="identifier">Endian</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert"></a><a class="link" href="reference.html#toward_boost_integer_endian.reference.integer_endian_conversion_hpp.convert" title="Non-Member Function Template convert&lt;&gt;">Non-Member
+ Function Template <code class="computeroutput"><span class="identifier">convert</span><span class="special">&lt;&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Endian1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Endian2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">convert</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+</pre>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2006 -2009 Beman Dawes<br>Copyright &#169; 2010 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="users_guide.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="appendices.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/users_guide.html
==============================================================================
--- (empty file)
+++ sandbox/endian_ext/libs/integer/endian/doc/html/toward_boost_integer_endian/users_guide.html 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -0,0 +1,1465 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Users'Guide</title>
+<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="up" href="../index.html" title="Toward Boost.Integer.Endian 0.2.0">
+<link rel="prev" href="overview.html" title="Overview">
+<link rel="next" href="reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="toward_boost_integer_endian.users_guide"></a><a class="link" href="users_guide.html" title="Users'Guide">Users'Guide</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started">Getting
+ Started</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install">Installing
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span></a></span></dt>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.hello_endian_world__">Hello
+ Endian World! </a></span></dt>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.limitations_">Limitations
+ </a></span></dt>
+</dl></dd>
+<dt><span class="section">Tutorial</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types">Endian
+ aware types</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types">Endian
+ unaware types</a></span></dt>
+</dl></dd>
+<dt><span class="section">Examples</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.examples.aware">Endian
+ Aware</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.examples.receiver_makes_right">"receiver
+ makes right"</a></span></dt>
+</dl></dd>
+<dt><span class="section">References</span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.users_guide.getting_started"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started" title="Getting Started">Getting
+ Started</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install">Installing
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span></a></span></dt>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.hello_endian_world__">Hello
+ Endian World! </a></span></dt>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.limitations_">Limitations
+ </a></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.users_guide.getting_started.install"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install" title="Installing Boost.Integer.Endian.Ext">Installing
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span></a>
+</h4></div></div></div>
+<a name="toward_boost_integer_endian.users_guide.getting_started.install.getting__emphasis_role__bold__boost_integer_endian_ext__emphasis_"></a><h6>
+<a name="id2933658"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install.getting__emphasis_role__bold__boost_integer_endian_ext__emphasis_">Getting
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span></a>
+ </h6>
+<p>
+ You can get the last stable release of <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span>
+ by downloading <code class="literal">integer_endian.zip</code> from the <a href="http://www.boost-consulting.com/vault/index.php?directory=Portability%20Programming" target="_top">Boost
+ Vault</a>
+ </p>
+<p>
+ You can also access the latest (unstable?) state from the <a href="https://svn.boost.org/svn/boost/sandbox/endian_ext" target="_top">Boost
+ Sandbox</a>.
+ </p>
+<a name="toward_boost_integer_endian.users_guide.getting_started.install.building__emphasis_role__bold__boost_integer_endian_ext__emphasis_"></a><h6>
+<a name="id2933719"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install.building__emphasis_role__bold__boost_integer_endian_ext__emphasis_">Building
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span></a>
+ </h6>
+<p>
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span> is implemented
+ entirely within headers, with no need to link to any Boost object libraries.
+ </p>
+<p>
+ Several macros allow user control over features:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ BOOST_ENDIAN_NO_CTORS causes class endian to have no constructors.
+ The intended use is for compiling user code that must be portable between
+ compilers regardless of C++0x Defaulted Functions support. Use of constructors
+ will always fail,
+ </li>
+<li class="listitem">
+ BOOST_ENDIAN_FORCE_PODNESS causes BOOST_ENDIAN_NO_CTORS to be defined
+ if the compiler does not support C++0x Defaulted Functions. This is
+ ensures that , and so can be used in unions. In C++0x, class endian
+ objects are POD's even though they have constructors.
+ </li>
+</ul></div>
+<a name="toward_boost_integer_endian.users_guide.getting_started.install.requirements"></a><h6>
+<a name="id2933790"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span> depends on some
+ Boost library. The library has been tested on trunk but an older version
+ should works also.
+ </p>
+<p>
+ In particular, <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span>
+ depends on:
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Boost.Config</span></dt>
+<dd><p>
+ for configuration purposes, ...
+ </p></dd>
+</dl>
+</div>
+<a name="toward_boost_integer_endian.users_guide.getting_started.install.exceptions_safety"></a><h6>
+<a name="id2933856"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install.exceptions_safety">Exceptions
+ safety</a>
+ </h6>
+<p>
+ All functions in the library are exception-neutral and provide strong guarantee
+ of exception safety as long as the underlying parameters provide it.
+ </p>
+<a name="toward_boost_integer_endian.users_guide.getting_started.install.thread_safety"></a><h6>
+<a name="id2933884"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install.thread_safety">Thread
+ safety</a>
+ </h6>
+<p>
+ All functions in the library are thread-unsafe except when noted explicitly.
+ </p>
+<a name="toward_boost_integer_endian.users_guide.getting_started.install.tested_compilers"></a><h6>
+<a name="id2933910"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.install.tested_compilers">Tested
+ compilers</a>
+ </h6>
+<p>
+ The implementation will eventually work with most C++03 conforming compilers.
+ Current version has been tested on:
+ </p>
+<p>
+ Cygwin 1.7 with
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ GCC 4.3.4
+ </li></ul></div>
+<p>
+ MinGW with
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ GCC 4.4.0
+ </li>
+<li class="listitem">
+ GCC 4.5.0
+ </li>
+<li class="listitem">
+ GCC 4.5.0 -std=c++0x
+ </li>
+</ul></div>
+<p>
+ Ubuntu 10.10
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ GCC 4.4.5
+ </li>
+<li class="listitem">
+ GCC 4.4.5 -std=c++0x
+ </li>
+</ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Please let us know how this works on other platforms/compilers.
+ </p></td></tr>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Please send any questions, comments and bug reports to boost &lt;at&gt;
+ lists &lt;dot&gt; boost &lt;dot&gt; org.
+ </p></td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.users_guide.getting_started.hello_endian_world__"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.hello_endian_world__" title="Hello Endian World!">Hello
+ Endian World! </a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">int_least32_t</span> <span class="identifier">v</span> <span class="special">=</span> <span class="number">0x31323334L</span><span class="special">;</span> <span class="comment">// = ASCII { '1', '2', '3', '4' }
+</span> <span class="comment">// value chosen to work on text stream
+</span> <span class="identifier">big32_t</span> <span class="identifier">b</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">little32_t</span> <span class="identifier">l</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Hello, endian world!\n\n"</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">v</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;=</span> <span class="identifier">v</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">b</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">l</span> <span class="special">&lt;=</span> <span class="char">'\n'</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ On a little-endian CPU, this program outputs:
+ </p>
+<pre class="programlisting"><span class="identifier">Hello</span><span class="special">,</span> <span class="identifier">endian</span> <span class="identifier">world</span><span class="special">!</span>
+
+<span class="number">825373492</span> <span class="number">825373492</span> <span class="number">825373492</span>
+<span class="number">4321</span> <span class="number">1234</span> <span class="number">4321</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.users_guide.getting_started.limitations_"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.limitations_" title="Limitations">Limitations
+ </a>
+</h4></div></div></div>
+<p>
+ Requires <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">climits</span><span class="special">&gt;</span> <span class="identifier">CHAR_BIT</span>
+ <span class="special">==</span> <span class="number">8</span></code>.
+ If <code class="computeroutput"><span class="identifier">CHAR_BIT</span></code> is some other
+ value, compilation will result in an <code class="computeroutput"><span class="preprocessor">#error</span></code>.
+ This restriction is in place because the design, implementation, testing,
+ and documentation has only considered issues related to 8-bit bytes, and
+ there have been no real-world use cases presented for other sizes.
+ </p>
+<p>
+ In C++03, endian does not meet the requirements for POD types because it
+ has constructors, private data members, and a base class. This means that
+ common use cases are relying on unspecified behavior in that the C++ Standard
+ does not guarantee memory layout for non-POD types. This has not been a
+ problem in practice since all known C++ compilers do layout memory as if
+ endian were a POD type. In C++0x, it will be possible to specify the default
+ constructor as trivial, and private data members and base classes will
+ no longer disqualify a type from being a POD. Thus under C++0x, endian
+ will no longer be relying on unspecified behavior.
+ </p>
+<a name="toward_boost_integer_endian.users_guide.getting_started.limitations_.binary_i_o_warnings_and_cautions"></a><h6>
+<a name="id2934700"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.getting_started.limitations_.binary_i_o_warnings_and_cautions">Binary
+ I/O warnings and cautions</a>
+ </h6>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Use only on streams opened with filemode <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">binary</span></code>.
+ Thus unformatted binary I/O should not be with the standard streams (<code class="computeroutput"><span class="identifier">cout</span></code>, <code class="computeroutput"><span class="identifier">cin</span></code>,
+ etc.) since they are opened in text mode. Use on text streams may produce
+ incorrect results, such as insertion of unwanted characters or premature
+ end-of-file. For example, on Windows <code class="computeroutput"><span class="number">0x0D</span></code>
+ would become <code class="computeroutput"><span class="number">0x0D</span></code>, <code class="computeroutput"><span class="number">0x0A</span></code>.
+ </p></td></tr>
+</table></div>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ Caution: When mixing formatted (i.e. operator <code class="computeroutput"><span class="special">&lt;&lt;</span></code>
+ or <code class="computeroutput"><span class="special">&gt;&gt;</span></code>) and unformatted
+ (i.e. operator <code class="computeroutput"><span class="special">&lt;=</span></code> or
+ <code class="computeroutput"><span class="special">&gt;=</span></code>) stream I/O, be aware
+ that <code class="computeroutput"><span class="special">&lt;&lt;</span></code> and <code class="computeroutput"><span class="special">&gt;&gt;</span></code> take precedence over <code class="computeroutput"><span class="special">&lt;=</span></code> and <code class="computeroutput"><span class="special">&gt;=</span></code>.
+ Use parentheses to force correct order of evaluation. For example:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">my_stream</span> <span class="special">&lt;&lt;</span> <span class="identifier">foo</span> <span class="special">&lt;=</span> <span class="identifier">bar</span><span class="special">;</span> <span class="comment">// no parentheses needed
+</span><span class="special">(</span><span class="identifier">my_stream</span> <span class="special">&lt;=</span> <span class="identifier">foo</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">bar</span><span class="special">;</span> <span class="comment">// parentheses required
+</span></pre>
+<p>
+ As a practical matter, it may be easier and safer to never mix the character
+ and binary insertion or extraction operators in the same statement.
+ </p>
+</td></tr>
+</table></div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.users_guide.tutorial"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial" title="Tutorial">Tutorial</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types">Endian
+ aware types</a></span></dt>
+<dd><dl><dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers">Endian
+ aware integers</a></span></dt></dl></dd>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types">Endian
+ unaware types</a></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types" title="Endian aware types">Endian
+ aware types</a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers">Endian
+ aware integers</a></span></dt></dl></div>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.basic_endian_holders"></a><h6>
+<a name="id2935008"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.basic_endian_holders">basic
+ endian holders</a>
+ </h6>
+<p>
+ <span class="bold"><strong>Boost.Integer.Endian.Ext</strong></span> provides an endian
+ aware byte-holder class template:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">endianness</span><span class="special">::</span><span class="identifier">enum_t</span> <span class="identifier">E</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bytes</span><span class="special">=</span><span class="number">8</span><span class="special">*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">),</span>
+ <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">enum_t</span> <span class="identifier">A</span> <span class="special">=</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">endian_pack</span><span class="special">;</span>
+</pre>
+<p>
+ This class provide portable byte-holders for data, independent of particular
+ computer architectures. Use cases almost always involve I/O, either via
+ files or network connections. Although data portability is the primary
+ motivation, these byte-holders may also be used to reduce memory use, file
+ size, or network activity since they provide binary integer sizes not otherwise
+ available.
+ </p>
+<p>
+ Such byte-holder types are traditionally called endian types. See the Wikipedia
+ for a full exploration of endianness, including definitions of big endian
+ and little endian.
+ </p>
+<p>
+ This class doesn't provides arithmetic operators, but of course automatic
+ conversion to and assignment from the underlying integer value type are
+ provided.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">::</span><span class="identifier">endianness</span><span class="special">;</span>
+
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">int_least32_t</span> <span class="identifier">v</span> <span class="special">=</span> <span class="number">0x31323334L</span><span class="special">;</span> <span class="comment">// = ASCII { '1', '2', '3', '4' }
+</span> <span class="comment">// value chosen to work on text stream
+</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="identifier">b</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="identifier">l</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">v</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ On a little-endian CPU, this program outputs:
+ </p>
+<pre class="programlisting"><span class="number">825373492</span> <span class="number">825373492</span> <span class="number">825373492</span>
+</pre>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.binary_streams"></a><h6>
+<a name="id2935648"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.binary_streams">Binary
+ streams</a>
+ </h6>
+<p>
+ Header &lt;boost/binary_stream.hpp&gt; provides operators <code class="computeroutput"><span class="special">&lt;=</span></code> and <code class="computeroutput"><span class="special">=&gt;</span></code>
+ for unformatted binary (as opposed to formatted character) stream insertion
+ and extraction of built-in and std::string types.
+ </p>
+<p>
+ Header &lt;boost/integer/endian/endian_binary_stream.hpp&gt; provides operators
+ <code class="computeroutput"><span class="special">&lt;=</span></code> and <code class="computeroutput"><span class="special">=&gt;</span></code>
+ for unformatted binary (as opposed to formatted character) stream insertion
+ and extraction of endian types.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">::</span><span class="identifier">endianness</span><span class="special">;</span>
+
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">int_least32_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="number">0x31323334L</span><span class="special">;</span> <span class="comment">// = ASCII { '1', '2', '3', '4' }
+</span> <span class="comment">// value chosen to work on text stream
+</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="identifier">b</span><span class="special">(</span><span class="identifier">n</span><span class="special">);</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="identifier">l</span><span class="special">(</span><span class="identifier">n</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">n</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;=</span> <span class="identifier">n</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">b</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">l</span> <span class="special">&lt;=</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ On a little-endian CPU, this program outputs:
+ </p>
+<pre class="programlisting"><span class="identifier">Hello</span><span class="special">,</span> <span class="identifier">endian</span> <span class="identifier">world</span><span class="special">!</span>
+
+<span class="number">825373492</span> <span class="number">825373492</span> <span class="number">825373492</span>
+<span class="number">4321</span> <span class="number">1234</span> <span class="number">4321</span>
+</pre>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_unaligned_byte_holders"></a><h6>
+<a name="id2936359"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_unaligned_byte_holders">endian
+ aware unaligned byte holders</a>
+ </h6>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">::</span><span class="identifier">endianness</span><span class="special">;</span>
+
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">int_least32_t</span> <span class="identifier">v</span> <span class="special">=</span> <span class="number">0x313233L</span><span class="special">;</span> <span class="comment">// = ASCII { '1', '2', '3' }
+</span> <span class="comment">// value chosen to work on text stream
+</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">unaligned</span><span class="special">&gt;</span> <span class="identifier">b</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">int_least32_t</span><span class="special">,</span> <span class="number">24</span><span class="special">,</span> <span class="identifier">unaligned</span><span class="special">&gt;</span> <span class="identifier">l</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">v</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;=</span> <span class="identifier">b</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">l</span> <span class="special">&lt;=</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ On a little-endian CPU, this program outputs:
+ </p>
+<pre class="programlisting"><span class="number">3224115</span> <span class="number">3224115</span> <span class="number">3224115</span>
+<span class="number">123</span> <span class="number">321</span>
+</pre>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_holders_common_typedefs"></a><h6>
+<a name="id2936918"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_holders_common_typedefs">endian
+ holders common typedefs</a>
+ </h6>
+<p>
+ Sixty typedefs, such as big32_t, provide convenient naming conventions
+ for common use cases:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Endianness
+ </p>
+ </th>
+<th>
+ <p>
+ Sign
+ </p>
+ </th>
+<th>
+ <p>
+ Sizes in bits (n)
+ </p>
+ </th>
+<th>
+ <p>
+ Alignment
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ubig</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulittle</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulittle</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">native</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unative</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">native</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_big</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_ubig</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_little</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_ulittle</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ The unaligned types do not cause compilers to insert padding bytes in classes
+ and structs. This is an important characteristic that can be exploited
+ to minimize wasted space in memory, files, and network transmissions.
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Code that uses aligned types is inherently 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></td></tr>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ One-byte big-endian, little-endian, and native-endian types provide identical
+ functionality. All three names are provided to improve code readability
+ and searchability.
+ </p></td></tr>
+</table></div>
+<p>
+ <span class="bold"><strong>Comment on naming</strong></span>
+ </p>
+<p>
+ When first exposed to endian types, programmers often fit them into a mental
+ model based on the &lt;cstdint&gt; types. Using that model, it is natural
+ to expect a 56-bit big-endian signed integer to be named <code class="computeroutput"><span class="identifier">int_big56_t</span></code>. But these byte-hodlers are
+ not realy integers.
+ </p>
+<p>
+ That seems to lead to formation of a new mental model specific to endian
+ byte-holder types. In that model, the endianness is the key feature, and
+ the integer aspect is downplayed. Once that mental transition is made,
+ a name like <code class="computeroutput"><span class="identifier">big56_t</span></code> is
+ a good reflection of the mental model.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">int_least32_t</span> <span class="identifier">v</span> <span class="special">=</span> <span class="number">0x31323334L</span><span class="special">;</span> <span class="comment">// = ASCII { '1', '2', '3', '4' }
+</span> <span class="comment">// value chosen to work on text stream
+</span> <span class="identifier">big32_t</span> <span class="identifier">b</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">little32_t</span> <span class="identifier">l</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">v</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ On a little-endian CPU, this program outputs:
+ </p>
+<pre class="programlisting"><span class="number">825373492</span> <span class="number">825373492</span> <span class="number">825373492</span>
+</pre>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_holders_of_udt"></a><h6>
+<a name="id2938188"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_holders_of_udt">endian
+ holders of UDT</a>
+ </h6>
+<p>
+ The user can define wrappers to integer types that behave as integers,
+ as it is the case for quantity&lt;&gt; class. This UDT can be packaged
+ on an endian holder to take care of endian issues, as show the following
+ example.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">units</span><span class="special">/</span><span class="identifier">io</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">units</span><span class="special">/</span><span class="identifier">quantity</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">units</span><span class="special">/</span><span class="identifier">systems</span><span class="special">/</span><span class="identifier">si</span><span class="special">/</span><span class="identifier">length</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">units</span><span class="special">/</span><span class="identifier">systems</span><span class="special">/</span><span class="identifier">si</span><span class="special">/</span><span class="identifier">plane_angle</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">::</span><span class="identifier">endianness</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">units</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">length</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="identifier">q</span> <span class="special">=</span> <span class="number">825373492</span> <span class="special">*</span> <span class="identifier">si</span><span class="special">::</span><span class="identifier">meter</span><span class="special">;</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">big</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">length</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">b</span><span class="special">;</span>
+ <span class="identifier">endian_pack</span><span class="special">&lt;</span><span class="identifier">little</span><span class="special">,</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">si</span><span class="special">::</span><span class="identifier">length</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">l</span><span class="special">;</span>
+ <span class="identifier">b</span><span class="special">=</span><span class="identifier">q</span><span class="special">;</span>
+ <span class="identifier">l</span><span class="special">=</span><span class="identifier">q</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">q</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;=</span> <span class="identifier">b</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">l</span> <span class="special">&lt;=</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ On a little-endian CPU, this program outputs:
+ </p>
+<pre class="programlisting"><span class="number">825373492</span> <span class="identifier">m</span> <span class="number">825373492</span> <span class="identifier">m</span> <span class="number">825373492</span> <span class="identifier">m</span>
+<span class="number">1234</span> <span class="number">4321</span>
+</pre>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.arrays_of_endian_holders"></a><h6>
+<a name="id2939206"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.arrays_of_endian_holders">Arrays
+ of endian holders</a>
+ </h6>
+<p>
+ Up to now we have see how to work with endian aware byte holders variables.
+ In this section we will see how to work with arrays of endian aware byte
+ holders.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">/</span><span class="identifier">endian_binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">binary_stream</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">int_least32_t</span> <span class="identifier">an</span><span class="special">[</span><span class="number">100</span><span class="special">]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0x31323334L</span> <span class="special">};</span> <span class="comment">// = ASCII { '1', '2', '3', '4' }
+</span> <span class="comment">// value chosen to work on text stream
+</span> <span class="identifier">big32_t</span> <span class="identifier">ab</span><span class="special">[</span><span class="number">100</span><span class="special">];</span>
+ <span class="identifier">little32_t</span> <span class="identifier">al</span><span class="special">[</span><span class="number">100</span><span class="special">];</span>
+
+ <span class="identifier">for_each</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">an</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">ab</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">' '</span> <span class="special">&lt;&lt;</span> <span class="identifier">al</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;=</span> <span class="identifier">an</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">ab</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">&lt;=</span> <span class="char">' '</span> <span class="special">&lt;=</span> <span class="identifier">al</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">&lt;=</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.structures_of_endian_holders"></a><h6>
+<a name="id2939824"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.structures_of_endian_holders">Structures
+ of endian holders</a>
+ </h6>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">UdpHeader</span> <span class="special">{</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">source_port</span><span class="special">;</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">destination_port</span><span class="special">;</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">length</span><span class="special">;</span>
+ <span class="identifier">ubig16_pt</span> <span class="identifier">checksum</span><span class="special">;</span>
+<span class="special">};</span> <span class="comment">// UdpHeader
+</span>
+<span class="identifier">UdpHeader</span> <span class="identifier">header</span><span class="special">;</span>
+<span class="identifier">header</span><span class="special">.</span><span class="identifier">source_port</span> <span class="special">=</span> <span class="number">1111</span><span class="special">;</span>
+<span class="identifier">header</span><span class="special">.</span><span class="identifier">destination_port</span> <span class="special">=</span> <span class="number">1234</span><span class="special">;</span>
+<span class="identifier">header</span><span class="special">.</span><span class="identifier">length</span> <span class="special">=</span> <span class="identifier">get_length</span><span class="special">(</span><span class="identifier">p</span><span class="special">);</span>
+<span class="identifier">header</span><span class="special">.</span><span class="identifier">checksum</span> <span class="special">=</span> <span class="identifier">checksum_of</span><span class="special">(</span><span class="identifier">p</span><span class="special">);</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers" title="Endian aware integers">Endian
+ aware integers</a>
+</h5></div></div></div>
+<p>
+ Boost endian integers are based on the byte_holder endian_pack class
+ template and provide in addition the same full set of C++ assignment,
+ arithmetic, and relational operators as C++ standard integral types,
+ with the standard semantics.
+ </p>
+<p>
+ One class template is provided:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">E</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n_bytes</span><span class="special">=</span><span class="number">8</span><span class="special">*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">),</span>
+ <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">enum_t</span> <span class="identifier">A</span> <span class="special">=</span> <span class="identifier">alignment</span><span class="special">::</span><span class="identifier">aligned</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">endian</span><span class="special">;</span>
+</pre>
+<p>
+ Unary arithmetic operators are <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">~</span></code>,
+ <code class="computeroutput"><span class="special">!</span></code>, prefix and postfix <code class="computeroutput"><span class="special">--</span></code> and <code class="computeroutput"><span class="special">++</span></code>.
+ Binary arithmetic operators are <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">+=</span></code>, <code class="computeroutput"><span class="special">-</span></code>,
+ <code class="computeroutput"><span class="special">-=</span></code>, <code class="computeroutput"><span class="special">*</span></code>,
+ <code class="computeroutput"><span class="special">*=</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
+ <code class="computeroutput"><span class="special">/=</span></code>, <code class="computeroutput"><span class="special">%</span></code>,
+ <code class="computeroutput"><span class="special">%=</span></code>, <code class="computeroutput"><span class="special">&amp;</span></code>,
+ <code class="computeroutput"><span class="special">&amp;=</span></code>, <code class="computeroutput"><span class="special">|</span></code>,
+ <code class="computeroutput"><span class="special">|=</span></code>, <code class="computeroutput"><span class="special">^</span></code>,
+ <code class="computeroutput"><span class="special">^=</span></code>, <code class="computeroutput"><span class="special">&lt;&lt;</span></code>,
+ <code class="computeroutput"><span class="special">&lt;&lt;=</span></code>, <code class="computeroutput"><span class="special">&gt;&gt;</span></code>, <code class="computeroutput"><span class="special">&gt;&gt;=</span></code>.
+ Binary relational operators are <code class="computeroutput"><span class="special">==</span></code>,
+ <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">&lt;</span></code>,
+ <code class="computeroutput"><span class="special">&lt;=</span></code>, <code class="computeroutput"><span class="special">&gt;</span></code>,
+ <code class="computeroutput"><span class="special">&gt;=</span></code>.
+ </p>
+<p>
+ Automatic conversion is provided to the underlying integer value type.
+ </p>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers.typedefs"></a><h6>
+<a name="id2940554"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers.typedefs">Typedefs</a>
+ </h6>
+<p>
+ Sixty typedefs, such as big32_t, provide convenient naming conventions
+ for common use cases:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Endianness
+ </p>
+ </th>
+<th>
+ <p>
+ Sign
+ </p>
+ </th>
+<th>
+ <p>
+ Sizes in bits (n)
+ </p>
+ </th>
+<th>
+ <p>
+ Alignment
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">int_big</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint_big</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">int_little</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint_little</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint_little</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">native</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 8,16,24,32,40,48,56,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unaligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint_native</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">native</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_int_big</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_uint_big</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_int_little</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ signed
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned_uint_little</span></code><span class="bold"><strong>n</strong></span><code class="computeroutput"><span class="identifier">_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ unsigned
+ </p>
+ </td>
+<td>
+ <p>
+ 16,32,64
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">aligned</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers.comment_on_naming"></a><h6>
+<a name="id2941400"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_aware_types.endian_aware_integers.comment_on_naming">Comment
+ on naming</a>
+ </h6>
+<p>
+ When first exposed to endian types, programmers often fit them into a
+ mental model based on the &lt;cstdint&gt; types. Using that model, it
+ is natural to expect a 56-bit big-endian signed integer to be named
+ <code class="computeroutput"><span class="identifier">int_big56_t</span></code>.
+ </p>
+<p>
+ As experience using these types grows, the realization creeps in that
+ they are lousy arithmetic integers - they are really byte holders that
+ for convenience support arithmetic operations - and that for use in internal
+ interfaces or anything more than trivial arithmetic computations it is
+ far better to convert values of these endian types to traditional integer
+ types.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types" title="Endian unaware types">Endian
+ unaware types</a>
+</h4></div></div></div>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types.working_with_third_party_structures"></a><h6>
+<a name="id2941477"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types.working_with_third_party_structures">Working
+ with third party structures</a>
+ </h6>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types.domain_map"></a><h6>
+<a name="id2941500"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types.domain_map">Domain
+ map</a>
+ </h6>
+<a name="toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types.in_place_conversions"></a><h6>
+<a name="id2941522"></a>
+ <a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.tutorial.endian_unaware_types.in_place_conversions">In-place
+ conversions</a>
+ </h6>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.users_guide.examples"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.examples" title="Examples">Examples</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.examples.aware">Endian
+ Aware</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#toward_boost_integer_endian.users_guide.examples.receiver_makes_right">"receiver
+ makes right"</a></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.users_guide.examples.aware"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.examples.aware" title="Endian Aware">Endian
+ Aware</a>
+</h4></div></div></div>
+<p>
+ The endian_example.cpp program writes a binary file containing four byte
+ big-endian and little-endian integers.
+ </p>
+<p>
+ This is an extract from a very widely used GIS file format. I have no idea
+ why a designer would mix big and little endians in the same file - but
+ this is a real-world format and users wishing to write low level code manipulating
+ these files have to deal with the mixed endianness.
+ </p>
+<p>
+ Low-level I/O such as POSIX read/write or &lt;cstdio&gt; fread/fwrite is
+ sometimes used for binary file operations when ultimate efficiency is important.
+ Such I/O is often performed in some C++ wrapper class, but to drive home
+ the point that endian integers are often used in fairly low-level code
+ that does bulk I/O operations, &lt;cstdio&gt; fopen/fwrite is used for
+ I/O in this example.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cstdio</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">endian</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integer</span><span class="special">;</span>
+
+<span class="keyword">namespace</span>
+<span class="special">{</span>
+
+ <span class="keyword">struct</span> <span class="identifier">header</span>
+ <span class="special">{</span>
+ <span class="identifier">big32_t</span> <span class="identifier">file_code</span><span class="special">;</span>
+ <span class="identifier">big32_t</span> <span class="identifier">file_length</span><span class="special">;</span>
+ <span class="identifier">little32_t</span> <span class="identifier">version</span><span class="special">;</span>
+ <span class="identifier">little32_t</span> <span class="identifier">shape_type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">filename</span> <span class="special">=</span> <span class="string">"test.dat"</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">assert</span><span class="special">(</span> <span class="keyword">sizeof</span><span class="special">(</span> <span class="identifier">header</span> <span class="special">)</span> <span class="special">==</span> <span class="number">16</span> <span class="special">);</span> <span class="comment">// requirement for interoperability
+</span>
+ <span class="identifier">header</span> <span class="identifier">h</span><span class="special">;</span>
+
+ <span class="identifier">h</span><span class="special">.</span><span class="identifier">file_code</span> <span class="special">=</span> <span class="number">0x04030201</span><span class="special">;</span>
+ <span class="identifier">h</span><span class="special">.</span><span class="identifier">file_length</span> <span class="special">=</span> <span class="keyword">sizeof</span><span class="special">(</span> <span class="identifier">header</span> <span class="special">);</span>
+ <span class="identifier">h</span><span class="special">.</span><span class="identifier">version</span> <span class="special">=</span> <span class="special">-</span><span class="number">1</span><span class="special">;</span>
+ <span class="identifier">h</span><span class="special">.</span><span class="identifier">shape_type</span> <span class="special">=</span> <span class="number">0x04030201</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">FILE</span> <span class="special">*</span> <span class="identifier">fi</span><span class="special">;</span>
+
+ <span class="keyword">if</span> <span class="special">(</span> <span class="special">!(</span><span class="identifier">fi</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">fopen</span><span class="special">(</span> <span class="identifier">filename</span><span class="special">,</span> <span class="string">"wb"</span> <span class="special">))</span> <span class="special">)</span> <span class="comment">// MUST BE BINARY
+</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"could not open "</span> <span class="special">&lt;&lt;</span> <span class="identifier">filename</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">fwrite</span><span class="special">(</span> <span class="special">&amp;</span><span class="identifier">h</span><span class="special">,</span> <span class="keyword">sizeof</span><span class="special">(</span> <span class="identifier">header</span> <span class="special">),</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">fi</span> <span class="special">)</span> <span class="special">!=</span> <span class="number">1</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"write failure for "</span> <span class="special">&lt;&lt;</span> <span class="identifier">filename</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">fclose</span><span class="special">(</span> <span class="identifier">fi</span> <span class="special">);</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"created file "</span> <span class="special">&lt;&lt;</span> <span class="identifier">filename</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ After compiling and executing endian_example.cpp, a hex dump of test.dat
+ shows:
+ </p>
+<pre class="programlisting"><span class="number">0403</span> <span class="number">0201</span> <span class="number">0000</span> <span class="number">0010</span> <span class="identifier">ffff</span> <span class="identifier">ffff</span> <span class="number">0102</span> <span class="number">0304</span>
+</pre>
+</div>
+<div class="section"><div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_integer_endian.users_guide.examples.receiver_makes_right"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.examples.receiver_makes_right" title='"receiver makes right"'>"receiver
+ makes right"</a>
+</h4></div></div></div></div>
+</div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_integer_endian.users_guide.ext_references"></a><a class="link" href="users_guide.html#toward_boost_integer_endian.users_guide.ext_references" title="References">References</a>
+</h3></div></div></div></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2006 -2009 Beman Dawes<br>Copyright &#169; 2010 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/endian_ext/libs/integer/endian/doc/integer_endian.pdf
==============================================================================
Binary file. No diff available.

Modified: sandbox/endian_ext/libs/integer/endian/doc/integer_endian.qbk
==============================================================================
--- sandbox/endian_ext/libs/integer/endian/doc/integer_endian.qbk (original)
+++ sandbox/endian_ext/libs/integer/endian/doc/integer_endian.qbk 2011-02-13 14:58:05 EST (Sun, 13 Feb 2011)
@@ -8,11 +8,12 @@
 
 [article Toward Boost.Integer.Endian
     [quickbook 1.4]
+ [version 0.2.0]
     [authors [Dawes, Beman]]
     [authors [Botet Escriba, Vicente J.]]
     [copyright 2006-2009 Beman Dawes]
     [copyright 2010 Vicente J. Botet Escriba]
- [purpose Endian Integers]
+
     [license
         Distributed under the Boost Software License, Version 1.0.
         (See accompanying file LICENSE_1_0.txt or copy at
@@ -20,6 +21,8 @@
     ]
 ]
 
+[def __Boost_Endian [*Boost.Integer.Endian.Ext]]
+
 [/
 [section Preface]
 
@@ -29,37 +32,13 @@
 [endsect]
 /]
 
-[warning Integer.Endian is not a part of the Boost libraries.]
+[warning __Boost_Endian is not a part of the Boost libraries.]
 
 
 [/========================]
 [section Overview]
 [/========================]
 
-[/==================]
-[heading Description]
-[/==================]
-
-This is an extension of the Beman's Boost.Integer.Endian, which was able to work with endian aware types, used to convert between types with different endian or even to carry on with arithmetic operations, by spliting the endian part from integer part and by adding support for aligned endian unaware types.
-
-[*Boost.Integer.Endian.Ext] provides:
-
-* Endian packs
- * Big endian | little endian | native endian byte ordering.
- * Signed | unsigned
- * Unaligned | aligned
- * 1-8 byte (unaligned) | 2, 4, 8 byte (aligned)
- * Choice of integer value type
-
-* Endian integers with the whole set of arithmetics operators.
-
-* Operators <= and => for unformatted binary (as opposed to formatted character) stream insertion and extraction of built-in, std::string types and of endian types.
-
-* Views of aligned endian unaware integer types as endian packs or endian integers so we can make endian conversion.
-
-* Generic in place conversion between different endian formats.
- * Very simple interface: convert_to/from<endiannes domain>(),
- * Support for built-in and user-defined data types view as fusion sequences.
 
 
 [/====================================]
@@ -70,12 +49,13 @@
 
 * Code is in `fixed width font` and is syntax-highlighted.
 * Replaceable text that you will need to supply is in [~italics].
-* If a name refers to a free function, it is specified like this:
- `free_function()`; that is, it is in code font and its name is followed by `()` to indicate that it is a free function.
+* Free functions are rendered in the code font followed by (), as in `free_function()`.
 * If a name refers to a class template, it is specified like this: `class_template<>`; that is, it is in code font and its name is followed by `<>` to indicate that it is a class template.
 * If a name refers to a function-like macro, it is specified like this: `MACRO()`;
   that is, it is uppercase in code font and its name is followed by `()` to indicate that it is a function-like macro. Object-like macros appear without the trailing `()`.
-* Names that refer to /concepts/ in the generic programming sense are specified in CamelCase.
+* Names that refer to /concepts/ in the generic programming sense are specified in CamelCase.
+
+[note In addition, notes such as this one specify non-essential information that provides additional background or rationale.]
 
 [note In addition, notes such as this one specify non-essential information that provides additional background or rationale.]
 
@@ -83,6 +63,7 @@
 
     // Include all of endian files
     #include <boost/integer/endian.hpp>
+ using namespace boost::integer;
 
 [/=================]
 [section Motivation]
@@ -96,7 +77,7 @@
 * 1-8 byte (unaligned) | 2, 4, 8 byte (aligned)
 * Choice of integer value type
 
-This endain aware design seems to be unappropiated to work with endian unaware types, but as we will see this is not completly true, as we can construct on top of the Beman's design endian unaware operation. Next follows some of the main critics that have been done recently.
+This endian aware design seems to be unappropiated to work with endian unaware types, but as we will see this is not completly true, as we can construct on top of the Beman's design endian unaware operation. Next follows some of the main critics that have been done recently.
 
 [heading Intrusive verus non-intrusive]
 [/====================================]
@@ -234,6 +215,34 @@
 Conversions between native and big/little endian formats must be simple.
 
 [endsect]
+
+
+[/==================]
+[section Description]
+[/==================]
+
+This is an extension of the Beman's Boost.Integer.Endian, which was able to work with endian aware types, used to convert between types with different endian or even to carry on with arithmetic operations, by spliting the endian part from integer part and by adding support for aligned endian unaware types.
+
+__Boost_Endian provides:
+
+* Endian packs
+ * Big endian | little endian | native endian byte ordering.
+ * Signed | unsigned
+ * Unaligned | aligned
+ * 1-8 byte (unaligned) | 2, 4, 8 byte (aligned)
+ * Choice of integer value type
+
+* Endian integers with the whole set of arithmetics operators.
+
+* Operators <= and => for unformatted binary (as opposed to formatted character) stream insertion and extraction of built-in, std::string types and of endian types.
+
+* Views of aligned endian unaware integer types as endian packs or endian integers so we can make endian conversion.
+
+* Generic in place conversion between different endian formats.
+ * Very simple interface: convert_to/from<endiannes domain>(),
+ * Support for built-in and user-defined data types view as fusion sequences.
+
+[endsect]
 [endsect]
 
 [/==============================]
@@ -245,22 +254,22 @@
 [/======================================]
 
 [/======================================]
-[section:install Installing Integer.Endian]
+[section:install Installing __Boost_Endian]
 [/======================================]
 
 [/=================================]
-[heading Getting Boost.Integer.Endian]
+[heading Getting __Boost_Endian]
 [/=================================]
 
-You can get the last stable release of Boost.Integer.Endian by downloading [^integer_endian.zip] from the
+You can get the last stable release of __Boost_Endian by downloading [^integer_endian.zip] from the
 [@http://www.boost-consulting.com/vault/index.php?directory=Portability%20Programming Boost Vault]
 
-You can also access the latest (unstable?) state from the [@https://svn.boost.org/svn/boost/sandbox/endian_split Boost Sandbox].
+You can also access the latest (unstable?) state from the [@https://svn.boost.org/svn/boost/sandbox/endian_ext Boost Sandbox].
 
-[heading Building Boost.Integer.Endian]
+[heading Building __Boost_Endian]
 [/====================================]
 
-Boost.Integer.Endian is implemented entirely within headers, with no need to link to any Boost object libraries.
+__Boost_Endian is implemented entirely within headers, with no need to link to any Boost object libraries.
 
 Several macros allow user control over features:
 
@@ -274,8 +283,15 @@
 [heading Requirements]
 [/=========================]
 
-[*Boost.Integer.Endian] depends on some Boost library. The library has been tested with version 1.43.0 but an older version should works also.
+__Boost_Endian depends on some Boost library. The library has been tested on trunk but an older version should works also.
 
+In particular, __Boost_Endian depends on:
+
+[variablelist
+[
+ [[@http://www.boost.org/libs/config [*Boost.Config]]] [for configuration purposes, ...]
+]
+]
 
 [/========================]
 [heading Exceptions safety]
@@ -293,25 +309,48 @@
 [heading Tested compilers]
 [/=======================]
 
-Currently, [*Boost.Integer.Endian] has been tested in the following compilers/platforms:
+The implementation will eventually work with most C++03 conforming compilers.
+Current version has been tested on:
+
+[/Windows with
+
+* MSVC 10.0
+
+Cygwin 1.5 with
+
+* GCC 3.4.4
+]
+Cygwin 1.7 with
+
+* GCC 4.3.4
+
+MinGW with
+
+* GCC 4.4.0
+* GCC 4.5.0
+* GCC 4.5.0 -std=c++0x
+[/* GCC 4.6.0
+* GCC 4.6.0 -std=c++0x]
+
+Ubuntu 10.10
+
+* GCC 4.4.5
+* GCC 4.4.5 -std=c++0x
 
-* GCC 3.4.4 Cygwin
-* GCC 4.4.0 MinGw
-* MSV9 9 EXpress Windows
 
-[/* GCC 4.3.2 Cygwin]
-[/* GCC 4.1.2 Linux]
+[note Please let us know how this works on other platforms/compilers.]
 
 [note Please send any questions, comments and bug reports to boost <at> lists <dot> boost <dot> org.]
 
+
 [endsect]
 [/=============================]
 [section Hello Endian World! ]
 [/=============================]
 
 
- #include <boost/integer/endian.hpp>
- #include <boost/integer/endian_binary_stream.hpp>
+ #include <boost/integer/endian/endian.hpp>
+ #include <boost/integer/endian/endian_binary_stream.hpp>
     #include <boost/binary_stream.hpp>
     #include <iostream>
 
@@ -374,7 +413,7 @@
 
 [heading basic endian holders]
 
-Boost.Integer.Endian provides an endian aware byte-holder class template:
+__Boost_Endian provides an endian aware byte-holder class template:
 
     template <endianness::enum_t E, typename T, std::size_t n_bytes=8*sizeof(T),
       alignment::enum_t A = alignment::aligned>
@@ -386,12 +425,12 @@
 
 This class doesn't provides arithmetic operators, but of course automatic conversion to and assignment from the underlying integer value type are provided.
 
- #include <boost/integer/endian_pack.hpp>
+ #include <boost/integer/endian/endian_pack.hpp>
     #include <iostream>
 
     using namespace boost;
     using namespace boost::integer;
- using namespace boost::endianness;
+ using namespace boost::integer::endianness;
 
 
     int main()
@@ -414,16 +453,16 @@
 
 Header <boost/binary_stream.hpp> provides operators `<=` and `=>` for unformatted binary (as opposed to formatted character) stream insertion and extraction of built-in and std::string types.
 
-Header <boost/integer/endian_binary_stream.hpp> provides operators `<=` and `=>` for unformatted binary (as opposed to formatted character) stream insertion and extraction of endian types.
+Header <boost/integer/endian/endian_binary_stream.hpp> provides operators `<=` and `=>` for unformatted binary (as opposed to formatted character) stream insertion and extraction of endian types.
 
- #include <boost/integer/endian_pack.hpp>
- #include <boost/integer/endian_binary_stream.hpp>
+ #include <boost/integer/endian/endian_pack.hpp>
+ #include <boost/integer/endian/endian_binary_stream.hpp>
     #include <boost/binary_stream.hpp>
     #include <iostream>
 
     using namespace boost;
     using namespace boost::integer;
- using namespace boost::endianness;
+ using namespace boost::integer::endianness;
 
 
     int main()
@@ -450,12 +489,12 @@
 [heading endian aware unaligned byte holders]
 
 
- #include <boost/integer/endian_pack.hpp>
+ #include <boost/integer/endian/endian_pack.hpp>
     #include <iostream>
 
     using namespace boost;
     using namespace boost::integer;
- using namespace boost::endianness;
+ using namespace boost::integer::endianness;
 
 
     int main()
@@ -512,7 +551,7 @@
 
 
 
- #include <boost/integer/endian_pack.hpp>
+ #include <boost/integer/endian/endian_pack.hpp>
     #include <iostream>
 
     using namespace boost;
@@ -540,8 +579,8 @@
 The user can define wrappers to integer types that behave as integers, as it is the case for
 quantity<> class. This UDT can be packaged on an endian holder to take care of endian issues, as show the following example.
 
- #include <boost/integer/endian_pack.hpp>
- #include <boost/integer/endian_binary_stream.hpp>
+ #include <boost/integer/endian/endian_pack.hpp>
+ #include <boost/integer/endian/endian_binary_stream.hpp>
     #include <boost/binary_stream.hpp>
     #include <iostream>
     #include <boost/units/io.hpp>
@@ -551,7 +590,7 @@
 
     using namespace boost;
     using namespace boost::integer;
- using namespace boost::endianness;
+ using namespace boost::integer::endianness;
     using namespace boost::units;
 
     int main()
@@ -575,8 +614,8 @@
 
 Up to now we have see how to work with endian aware byte holders variables. In this section we will see how to work with arrays of endian aware byte holders.
 
- #include <boost/integer/endian_pack.hpp>
- #include <boost/integer/endian_binary_stream.hpp>
+ #include <boost/integer/endian/endian_pack.hpp>
+ #include <boost/integer/endian/endian_binary_stream.hpp>
     #include <boost/binary_stream.hpp>
     #include <iostream>
 
@@ -615,14 +654,14 @@
 
 
 [/===========================]
-[section Endian unaware integers]
+[section Endian aware integers]
 [/===========================]
 
 Boost endian integers are based on the byte_holder endian_pack class template and provide in addition the same full set of C++ assignment, arithmetic, and relational operators as C++ standard integral types, with the standard semantics.
 
 One class template is provided:
 
- template <endianness::enum_t E, typename T, std::size_t n_bytes=8*sizeof(T),
+ template <typename E, typename T, std::size_t n_bytes=8*sizeof(T),
       alignment::enum_t A = alignment::aligned>
     class endian;
 
@@ -678,6 +717,91 @@
 
 [endsect]
 
+[section Examples]
+
+[section:aware Endian Aware]
+
+The endian_example.cpp program writes a binary file containing four byte big-endian and little-endian integers.
+
+This is an extract from a very widely used GIS file format. I have no idea
+why a designer would mix big and little endians in the same file - but
+this is a real-world format and users wishing to write low level code
+manipulating these files have to deal with the mixed endianness.
+
+Low-level I/O such as POSIX read/write or <cstdio> fread/fwrite is sometimes
+used for binary file operations when ultimate efficiency is important.
+Such I/O is often performed in some C++ wrapper class, but to drive home the
+point that endian integers are often used in fairly low-level code that
+does bulk I/O operations, <cstdio> fopen/fwrite is used for I/O in this example.
+
+
+ #include <iostream>
+ #include <cassert>
+ #include <cstdio>
+ #include <boost/integer/endian.hpp>
+
+ using namespace boost::integer;
+
+ namespace
+ {
+
+ struct header
+ {
+ big32_t file_code;
+ big32_t file_length;
+ little32_t version;
+ little32_t shape_type;
+ };
+
+ const char * filename = "test.dat";
+ }
+
+ int main()
+ {
+ assert( sizeof( header ) == 16 ); // requirement for interoperability
+
+ header h;
+
+ h.file_code = 0x04030201;
+ h.file_length = sizeof( header );
+ h.version = -1;
+ h.shape_type = 0x04030201;
+
+ std::FILE * fi;
+
+ if ( !(fi = std::fopen( filename, "wb" )) ) // MUST BE BINARY
+ {
+ std::cout << "could not open " << filename << '\n';
+ return 1;
+ }
+
+ if ( std::fwrite( &h, sizeof( header ), 1, fi ) != 1 )
+ {
+ std::cout << "write failure for " << filename << '\n';
+ return 1;
+ }
+
+ std::fclose( fi );
+
+ std::cout << "created file " << filename << '\n';
+ return 0;
+ }
+
+After compiling and executing endian_example.cpp, a hex dump of test.dat shows:
+
+ 0403 0201 0000 0010 ffff ffff 0102 0304
+
+
+
+[endsect]
+
+[/=============================]
+[section:receiver_makes_right "receiver makes right"]
+[/=============================]
+
+[endsect]
+[endsect]
+
 
 [/================================]
 [section:ext_references References]
@@ -705,6 +829,98 @@
 [/================]
 
 [/==========================================================================================]
+[section:binary_stream_hpp Header `<boost/binary_stream.hpp>`]
+[/==========================================================================================]
+
+Header <boost/binary_stream.hpp> provides operators `<=` and `=>` for unformatted binary (as opposed to formatted character) stream insertion and extraction of built-in and std::string types.
+
+[heading Synopsis]
+
+ namespace boost
+ {
+
+ // built-in types ------------------------------------------------------------------//
+
+ std::ostream& operator<=(std::ostream& os, short v);
+ std::istream& operator>=(std::istream& is, short& v);
+
+ std::ostream& operator<=(std::ostream& os, unsigned short v);
+ std::istream& operator>=(std::istream& is, unsigned short& v);
+
+ std::ostream& operator<=(std::ostream& os, int v);
+ std::istream& operator>=(std::istream& is, int& v);
+
+ std::ostream& operator<=(std::ostream& os, unsigned int v);
+ std::istream& operator>=(std::istream& is, unsigned int& v);
+
+ std::ostream& operator<=(std::ostream& os, long v);
+ std::istream& operator>=(std::istream& is, long& v);
+
+ std::ostream& operator<=(std::ostream& os, unsigned long v);
+ std::istream& operator>=(std::istream& is, unsigned long& v);
+
+ std::ostream& operator<=(std::ostream& os, long long v);
+ std::istream& operator>=(std::istream& is, long long& v);
+
+ std::ostream& operator<=(std::ostream& os, unsigned long long v);
+ std::istream& operator>=(std::istream& is, unsigned long long& v);
+
+ std::ostream& operator<=(std::ostream& os, float v);
+ std::istream& operator>=(std::istream& is, float& v);
+
+ std::ostream& operator<=(std::ostream& os, double v);
+ std::istream& operator>=(std::istream& is, double& v);
+
+ std::ostream& operator<=(std::ostream& os, long double v);
+ std::istream& operator>=(std::istream& is, long double& v);
+
+ std::ostream& operator<=(std::ostream& os, char c);
+ std::istream& operator>=(std::istream& is, char& c);
+
+ std::ostream& operator<=(std::ostream& os, signed char c);
+ std::istream& operator>=(std::istream& is, signed char& c);
+
+ std::ostream& operator<=(std::ostream& os, unsigned char c);
+ std::istream& operator>=(std::istream& is, unsigned char& c);
+
+ std::ostream& operator<=(std::ostream& os, wchar_t v);
+ std::istream& operator>=(std::istream& is, wchar_t& v);
+
+ // strings -------------------------------------------------------------------------//
+
+ std::ostream& operator<=(std::ostream& os, const char* p);
+
+ std::ostream& operator<=(std::ostream& os, const signed char* p);
+
+ std::ostream& operator<=(std::ostream& os, const unsigned char* p);
+
+ #ifndef BOOST_NO_CWCHAR
+ std::ostream& operator<=(std::ostream& os, const wchar_t* p);
+ #endif
+
+ std::ostream& operator<=(std::ostream& os, const std::string& s);
+ std::istream& operator>=(std::istream& is, std::string& s);
+
+ #ifndef BOOST_NO_STD_WSTRING
+ std::ostream& operator<=(std::ostream& os, const std::wstring& s);
+ std::istream& operator>=(std::istream& is, std::wstring& s);
+ #endif
+
+ } // namespace boost
+
+[note Omission of bool and void* is deliberate; any semantics would be questionable]
+
+[warning
+Note the asymmetry between output and input; a string with embedded
+nulls will be output with the embedded nulls, but input will stop at the first null.
+So it probably isn't a good idea to use these functions for strings with nulls.
+]
+
+[endsect]
+
+
+[/
+[/==========================================================================================]
 [section:alignment_hpp Header `<boost/alignment.hpp>`]
 [/==========================================================================================]
 
@@ -727,12 +943,12 @@
 [endsect]
     
 [endsect]
-
+]
 [/==========================================================================================]
-[section:integer_endianness_hpp Header `<boost/integer/endiannes.hpp>`]
+[section:integer_endianness_hpp Header `<boost/integer/endian/endiannes.hpp>`]
 [/==========================================================================================]
 
-Header <boost/endian/endianness.hpp> provides the endianness tags.
+Header <boost/endian/endian/endianness.hpp> provides the endianness tags.
 
 [heading Synopsis]
 
@@ -813,10 +1029,10 @@
 [endsect]
 
 [/==========================================================================================]
-[section:endian_domain_map_hpp Header `<boost/endian/domain_map.hpp>`]
+[section:endian_domain_map_hpp Header `<boost/integer/endian/domain_map.hpp>`]
 [/==========================================================================================]
 
-This file contains the default implementation ofr the `domaain_map` metafunction.
+This file contains the default implementation ofr the `domain_map` metafunction.
 
 [heading Synopsis]
 
@@ -857,102 +1073,12 @@
 
 [endsect]
 
-[/==========================================================================================]
-[section:binary_stream_hpp Header `<boost/binary_stream.hpp>`]
-[/==========================================================================================]
-
-Header <boost/binary_stream.hpp> provides operators `<=` and `=>` for unformatted binary (as opposed to formatted character) stream insertion and extraction of built-in and std::string types.
-
-[heading Synopsis]
-
- namespace boost
- {
-
- // built-in types ------------------------------------------------------------------//
-
- std::ostream& operator<=(std::ostream& os, short v);
- std::istream& operator>=(std::istream& is, short& v);
-
- std::ostream& operator<=(std::ostream& os, unsigned short v);
- std::istream& operator>=(std::istream& is, unsigned short& v);
-
- std::ostream& operator<=(std::ostream& os, int v);
- std::istream& operator>=(std::istream& is, int& v);
-
- std::ostream& operator<=(std::ostream& os, unsigned int v);
- std::istream& operator>=(std::istream& is, unsigned int& v);
-
- std::ostream& operator<=(std::ostream& os, long v);
- std::istream& operator>=(std::istream& is, long& v);
-
- std::ostream& operator<=(std::ostream& os, unsigned long v);
- std::istream& operator>=(std::istream& is, unsigned long& v);
-
- std::ostream& operator<=(std::ostream& os, long long v);
- std::istream& operator>=(std::istream& is, long long& v);
-
- std::ostream& operator<=(std::ostream& os, unsigned long long v);
- std::istream& operator>=(std::istream& is, unsigned long long& v);
-
- std::ostream& operator<=(std::ostream& os, float v);
- std::istream& operator>=(std::istream& is, float& v);
-
- std::ostream& operator<=(std::ostream& os, double v);
- std::istream& operator>=(std::istream& is, double& v);
-
- std::ostream& operator<=(std::ostream& os, long double v);
- std::istream& operator>=(std::istream& is, long double& v);
-
- std::ostream& operator<=(std::ostream& os, char c);
- std::istream& operator>=(std::istream& is, char& c);
-
- std::ostream& operator<=(std::ostream& os, signed char c);
- std::istream& operator>=(std::istream& is, signed char& c);
-
- std::ostream& operator<=(std::ostream& os, unsigned char c);
- std::istream& operator>=(std::istream& is, unsigned char& c);
-
- std::ostream& operator<=(std::ostream& os, wchar_t v);
- std::istream& operator>=(std::istream& is, wchar_t& v);
-
- // strings -------------------------------------------------------------------------//
-
- std::ostream& operator<=(std::ostream& os, const char* p);
-
- std::ostream& operator<=(std::ostream& os, const signed char* p);
-
- std::ostream& operator<=(std::ostream& os, const unsigned char* p);
-
- #ifndef BOOST_NO_CWCHAR
- std::ostream& operator<=(std::ostream& os, const wchar_t* p);
- #endif
-
- std::ostream& operator<=(std::ostream& os, const std::string& s);
- std::istream& operator>=(std::istream& is, std::string& s);
-
- #ifndef BOOST_NO_STD_WSTRING
- std::ostream& operator<=(std::ostream& os, const std::wstring& s);
- std::istream& operator>=(std::istream& is, std::wstring& s);
- #endif
-
- } // namespace boost
-
-[note Omission of bool and void* is deliberate; any semantics would be questionable]
-
-[warning
-Note the asymmetry between output and input; a string with embedded
-nulls will be output with the embedded nulls, but input will stop at the first null.
-So it probably isn't a good idea to use these functions for strings with nulls.
-]
-
-[endsect]
-
 
 [/==========================================================================================]
-[section:integer_endian_pack_hpp Header `<boost/integer/endian_pack.hpp>`]
+[section:integer_endian_pack_hpp Header `<boost/integer/endian/endian_pack.hpp>`]
 [/==========================================================================================]
 
-This file contains the core class template of Boost.Integer.Endian. Provides byte-holder binary types with explicit control over byte order, value type, size, and alignment. Typedefs provide easy-to-use names for common configurations.
+This file contains the core class template of __Boost_Endian. Provides byte-holder binary types with explicit control over byte order, value type, size, and alignment. Typedefs provide easy-to-use names for common configurations.
 
 [heading Synopsis]
 
@@ -1067,7 +1193,7 @@
 [section:endian_pack Template class `endian_pack<>`]
 [/==========================================================================================]
 
-An `endian_pack` is an byte-holder with user-specified endianness, value type, size, and alignment.
+An `endian_pack` is a byte-holder with user-specified endianness, value type, size, and alignment.
 
         template <
             typename E,
@@ -1162,10 +1288,10 @@
 
 [endsect]
 [/==========================================================================================]
-[section:integer_endian_hpp Header `<boost/integer/endian.hpp>`]
+[section:integer_endian_hpp Header `<boost/integer/endian/endian.hpp>`]
 [/==========================================================================================]
 
-Header `<boost/integer/endian.hpp>` provides integer-like byte-holder binary types with explicit control over byte order, value type, size, and alignment. Typedefs provide easy-to-use names for common configurations.
+Header `<boost/integer/endian/endian.hpp>` provides integer-like byte-holder binary types with explicit control over byte order, value type, size, and alignment. Typedefs provide easy-to-use names for common configurations.
 
 
 [heading Synopsis]
@@ -1375,10 +1501,10 @@
 [endsect]
 
 [/==========================================================================================]
-[section:integer_endian_binary_stream_hpp Header `<boost/integer/endian_binary_stream.hpp>`]
+[section:integer_endian_binary_stream_hpp Header `<boost/integer/endian/endian_binary_stream.hpp>`]
 [/==========================================================================================]
 
-Header <boost/integer/endian_binary_stream.hpp> provides operators `<=` and `=>` for unformatted binary (as opposed to formatted character) stream insertion and extraction of endian types.
+Header <boost/integer/endian/endian_binary_stream.hpp> provides operators `<=` and `=>` for unformatted binary (as opposed to formatted character) stream insertion and extraction of endian types.
 
 [heading Synopsis]
 
@@ -1406,7 +1532,7 @@
 [endsect]
 
 [/==========================================================================================]
-[section:integer_endian_type_hpp Header `<boost/integer/endian_type.hpp>`]
+[section:integer_endian_type_hpp Header `<boost/integer/endian/endian_type.hpp>`]
 [/==========================================================================================]
 
 [heading Synopsis]
@@ -1444,7 +1570,7 @@
 
 [endsect]
 [/==========================================================================================]
-[section:integer_endian_view_hpp Header `<boost/integer/endian_view.hpp>`]
+[section:integer_endian_view_hpp Header `<boost/integer/endian/endian_view.hpp>`]
 [/==========================================================================================]
 
 This file provides the `endian_view<>` class template as well as some factory helper functions.
@@ -1586,7 +1712,7 @@
 [endsect]
 
 [/==========================================================================================]
-[section:integer_endian_conversion_hpp Header `<boost/integer/endian_conversion.hpp>`]
+[section:integer_endian_conversion_hpp Header `<boost/integer/endian/endian_conversion.hpp>`]
 [/==========================================================================================]
 
 [heading Synopsis]
@@ -1701,97 +1827,21 @@
 [endsect]
 
 [endsect]
-[section Examples]
-
-[section: Endian Aware]
 
-The endian_example.cpp program writes a binary file containing four byte big-endian and little-endian integers.
-
-This is an extract from a very widely used GIS file format. I have no idea
-why a designer would mix big and little endians in the same file - but
-this is a real-world format and users wishing to write low level code
-manipulating these files have to deal with the mixed endianness.
 
-Low-level I/O such as POSIX read/write or <cstdio> fread/fwrite is sometimes
-used for binary file operations when ultimate efficiency is important.
-Such I/O is often performed in some C++ wrapper class, but to drive home the
-point that endian integers are often used in fairly low-level code that
-does bulk I/O operations, <cstdio> fopen/fwrite is used for I/O in this example.
-
-
- #include <iostream>
- #include <cassert>
- #include <cstdio>
- #include <boost/integer/endian.hpp>
-
- using namespace boost::integer;
-
- namespace
- {
-
- struct header
- {
- big32_t file_code;
- big32_t file_length;
- little32_t version;
- little32_t shape_type;
- };
-
- const char * filename = "test.dat";
- }
-
- int main()
- {
- assert( sizeof( header ) == 16 ); // requirement for interoperability
-
- header h;
-
- h.file_code = 0x04030201;
- h.file_length = sizeof( header );
- h.version = -1;
- h.shape_type = 0x04030201;
-
- std::FILE * fi;
-
- if ( !(fi = std::fopen( filename, "wb" )) ) // MUST BE BINARY
- {
- std::cout << "could not open " << filename << '\n';
- return 1;
- }
-
- if ( std::fwrite( &h, sizeof( header ), 1, fi ) != 1 )
- {
- std::cout << "write failure for " << filename << '\n';
- return 1;
- }
-
- std::fclose( fi );
-
- std::cout << "created file " << filename << '\n';
- return 0;
- }
-
-After compiling and executing endian_example.cpp, a hex dump of test.dat shows:
-
- 0403 0201 0000 0010 ffff ffff 0102 0304
-
-
-
-[endsect]
+[/=================]
+[section Appendices]
+[/=================]
+[section:history Appendix A: History]
+[section [*Version 0.2.0, Febraury 15, 2011] ]
 
-[/=============================]
-[section:receiver_makes_right "receiver makes right"]
-[/=============================]
+Move to boost/integer/endian directory.
 
 [endsect]
-[endsect]
 
+[section [*Version 0.1.0, June 15, 2010]]
 
-[/=================]
-[section Appendices]
-[/=================]
-[section:history Appendix A: History]
-[section [*Version 0.1.0, June 15, 2010] ['Split of Boost.Integer.Endian + Added Endian views]]
+Split of Boost.Integer.Endian + Added Endian views.
 
 [*Features:]
 
@@ -1817,7 +1867,7 @@
 
 [section:rationale Appendix B: Rationale]
 
-[heading Design considerations for Boost.Integer.Endian]
+[heading Design considerations for __Boost_Endian]
 
 * Must be suitable for I/O - in other words, must be memcpyable.
 * Must provide exactly the size and internal byte ordering specified.
@@ -1833,7 +1883,7 @@
 
 [heading Motivating use cases]
 
-Neil Mayhew writes: "I can also provide a meaningful use-case for this library: reading TrueType font files from disk and processing the contents. The data format has fixed endianness (big) and has unaligned values in various places. Using Boost.Integer.Endian simplifies and cleans the code wonderfully."
+Neil Mayhew writes: "I can also provide a meaningful use-case for this library: reading TrueType font files from disk and processing the contents. The data format has fixed endianness (big) and has unaligned values in various places. Using __Boost_Endian simplifies and cleans the code wonderfully."
 
 [heading C++0x]
 
@@ -1858,7 +1908,7 @@
 
 * *Are endian types POD's?* Yes for C++0x. No for C++03, although several macros are available to force PODness in all cases.
 
-* *What are the implications endian types not being POD's with C++03 compilers?* They can't be used in unions. Also, compilers aren't required to align or lay out storage in portable ways, although this potential problem hasn't prevented use of Boost.Integer.Endian with real compilers.
+* *What are the implications endian types not being POD's with C++03 compilers?* They can't be used in unions. Also, compilers aren't required to align or lay out storage in portable ways, although this potential problem hasn't prevented use of __Boost_Endian with real compilers.
 
 * *Which is better, big-endian or little-endian?* Big-endian tends to be a bit more of an industry standard, but little-endian may be preferred for applications that run primarily on x86 (Intel/AMD) and other little-endian CPU's. The [@http://en.wikipedia.org/wiki/Endian Wikipedia] article gives more pros and cons.
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk