Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54933 - in sandbox/mp_math/libs/mp_math/doc: . html/integer
From: baraclese_at_[hidden]
Date: 2009-07-13 16:26:24


Author: baraclese
Date: 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
New Revision: 54933
URL: http://svn.boost.org/trac/boost/changeset/54933

Log:
* add generated html docs
* add integer_reference.qbk

Added:
   sandbox/mp_math/libs/mp_math/doc/html/integer/
   sandbox/mp_math/libs/mp_math/doc/html/integer/bibliography.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/implementation_notes.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/integer_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/performance.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/primality_tests_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/tutorial.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/unbounded_int_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/unbounded_traits_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_integer_bits_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_integer_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_mp_int_bits_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_mp_int_reference.html (contents, props changed)
   sandbox/mp_math/libs/mp_math/doc/integer_reference.qbk (contents, props changed)

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/bibliography.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/bibliography.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,72 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Bibliography</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="primality_tests_reference.html" title="Primality Tests 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="primality_tests_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.bibliography"></a><a class="link" href="bibliography.html" title="Bibliography">Bibliography</a>
+</h2></div></div></div>
+<a name="integer.bibliography.gmp__gnu_multiple_precision_arithmetic_library_"></a><h4>
+<a name="id2710341"></a>
+ <a class="link" href="bibliography.html#integer.bibliography.gmp__gnu_multiple_precision_arithmetic_library_">GMP
+ (GNU Multiple Precision Arithmetic Library)</a>
+ </h4>
+<div class="itemizedlist"><ul type="disc"><li>http://gmplib.org/</li></ul></div>
+<a name="integer.bibliography.handbook_of_applied_cryptogtaphy"></a><h4>
+<a name="id2710376"></a>
+ <a class="link" href="bibliography.html#integer.bibliography.handbook_of_applied_cryptogtaphy">Handbook
+ of Applied Cryptogtaphy</a>
+ </h4>
+<div class="itemizedlist"><ul type="disc"><li>http://www.cacr.math.uwaterloo.ca/hac/</li></ul></div>
+<a name="integer.bibliography.libtommath"></a><h4>
+<a name="id2710410"></a>
+ <a class="link" href="bibliography.html#integer.bibliography.libtommath">libtommath</a>
+ </h4>
+<div class="itemizedlist"><ul type="disc">
+<li>
+http://libtom.org/<code class="computeroutput"><span class="comment">// this link seems to be down lately (10/26/2008)</span></code>
+</li>
+<li>
+http://math.libtomcrypt.com/<code class="computeroutput"><span class="comment">// this works but is out of date</span></code>
+</li>
+</ul></div>
+<a name="integer.bibliography.miller_rabin_primality_test"></a><h4>
+<a name="id2710476"></a>
+ <a class="link" href="bibliography.html#integer.bibliography.miller_rabin_primality_test">Miller-Rabin
+ Primality Test</a>
+ </h4>
+<div class="itemizedlist"><ul type="disc"><li>http://www.bitnuts.de/rienhardt/docs/miller_rabin.pdf</li></ul></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 © 2008 - 2009 Kevin Sopp<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="primality_tests_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/implementation_notes.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/implementation_notes.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,101 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Implementation notes</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="performance.html" title="Performance">
+<link rel="next" href="integer_reference.html" title="integer 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="performance.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="integer_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.implementation_notes"></a><a class="link" href="implementation_notes.html" title="Implementation notes">Implementation notes</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="implementation_notes.html#integer.implementation_notes.integer_structure">integer
+ structure</a></span></dt>
+<dt><span class="section">Semantics</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.implementation_notes.integer_structure"></a><a class="link" href="implementation_notes.html#integer.implementation_notes.integer_structure" title="integer structure">integer
+ structure</a>
+</h3></div></div></div>
+<p>
+ An <code class="computeroutput"><span class="identifier">integer</span></code> is handled in
+ a sign plus magnitude representation which looks like this:
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">integer</span>
+<span class="special">{</span>
+ <span class="identifier">digit_type</span><span class="special">*</span> <span class="identifier">digits_</span><span class="special">;</span>
+ <span class="identifier">size_type</span> <span class="identifier">size_</span><span class="special">,</span> <span class="identifier">capacity_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The sign is stored in the high bit of <code class="computeroutput"><span class="identifier">capacity_</span></code>
+ which is 0 for positive and 1 for negative integers. The least significant
+ digit of the number always lives at <code class="computeroutput"><span class="identifier">digits_</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
+ while the most significant lives at <code class="computeroutput"><span class="identifier">digits_</span><span class="special">[</span><span class="identifier">size_</span> <span class="special">-</span> <span class="number">1</span><span class="special">]</span></code>.
+ </p>
+<p>
+ Libtommath on which this code is ultimately based chose a <code class="computeroutput"><span class="identifier">digit_type</span></code>
+ representation which does not use all of its bits, instead some bits are
+ reserved to hold carries in intermediate results. This allows very fast multiplication
+ routines. I chose a different representation which uses all the bits in the
+ <code class="computeroutput"><span class="identifier">digit_type</span></code> but needs explicit
+ carry handling in the code. This makes normal c++ code a tad slower. However
+ it makes it much easier to write assembler routines since most CPUs provide
+ instructions that allow the handling of carries in place. It is possible
+ that a <code class="computeroutput"><span class="identifier">digit_type</span></code> representation
+ similar to libtommath's returns someday which can then be enabled via a different
+ traits class template.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.implementation_notes.semantics"></a><a class="link" href="implementation_notes.html#integer.implementation_notes.semantics" title="Semantics">Semantics</a>
+</h3></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ An <code class="computeroutput"><span class="identifier">integer</span></code> with a value
+ of zero has a <code class="computeroutput"><span class="identifier">size_</span></code> of
+ 1 and <code class="computeroutput"><span class="identifier">digits_</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code> holds
+ the value 0.
+ </li>
+<li>
+ An unitialized <code class="computeroutput"><span class="identifier">integer</span></code>
+ has no value and all operations on it except for initializing or swapping
+ are undefined.
+ </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 © 2008 - 2009 Kevin Sopp<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="performance.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="integer_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/integer_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/integer_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,134 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>integer reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="implementation_notes.html" title="Implementation notes">
+<link rel="next" href="unbounded_int_reference.html" title="unbounded_int 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="implementation_notes.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="unbounded_int_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.integer_reference"></a><a class="link" href="integer_reference.html" title="integer reference">integer reference</a>
+</h2></div></div></div>
+<a name="integer.integer_reference.synopsis"></a><h4>
+<a name="id2663117"></a>
+ <a class="link" href="integer_reference.html#integer.integer_reference.synopsis">Synopsis</a>
+ </h4>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/integer.hpp&gt;
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Type</span> <span class="special">=</span> <span class="identifier">unbounded</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">integer</span> <span class="special">:</span> <span class="identifier">Type</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">Type</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">type</span><span class="special">::</span><span class="identifier">traits_type</span> <span class="identifier">traits_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">type</span><span class="special">::</span><span class="identifier">digit_type</span> <span class="identifier">digit_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">type</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">type</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">type</span><span class="special">::</span><span class="identifier">const_iterator</span> <span class="identifier">const_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">type</span><span class="special">::</span><span class="identifier">reverse_iterator</span> <span class="identifier">reverse_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">type</span><span class="special">::</span><span class="identifier">const_reverse_iterator</span> <span class="identifier">const_reverse_iterator</span><span class="special">;</span>
+
+ <span class="identifier">integer</span><span class="special">(){}</span>
+
+ <span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_NO_VARIADIC_TEMPLATES</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_NO_RVALUE_REFERENCES</span><span class="special">)</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> <span class="identifier">Args</span><span class="special">&gt;</span>
+ <span class="identifier">integer</span><span class="special">(</span><span class="identifier">Args</span><span class="special">&amp;&amp;...</span> <span class="identifier">args</span><span class="special">)</span>
+ <span class="special">:</span>
+ <span class="identifier">type</span><span class="special">(</span><span class="identifier">args</span><span class="special">...)</span>
+ <span class="special">{}</span>
+
+ <span class="preprocessor">#else</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">&gt;</span>
+ <span class="identifier">integer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">type</span><span class="special">(</span><span class="identifier">t1</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">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">&gt;</span>
+ <span class="identifier">integer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T2</span><span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">type</span><span class="special">(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</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">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">&gt;</span>
+ <span class="identifier">integer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T2</span><span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T3</span><span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">type</span><span class="special">(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">t3</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">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span><span class="special">&gt;</span>
+ <span class="identifier">integer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T2</span><span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T3</span><span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T4</span><span class="special">&amp;</span> <span class="identifier">t4</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">type</span><span class="special">(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">t4</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">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T5</span><span class="special">&gt;</span>
+ <span class="identifier">integer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T2</span><span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T3</span><span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T4</span><span class="special">&amp;</span> <span class="identifier">t4</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T5</span><span class="special">&amp;</span> <span class="identifier">t5</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">type</span><span class="special">(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">t4</span><span class="special">,</span> <span class="identifier">t5</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="preprocessor">#endif</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="preprocessor">#ifndef</span> <span class="identifier">BOOST_NO_RVALUE_REFERENCES</span>
+ <span class="identifier">integer</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">T</span><span class="special">&amp;&amp;</span> <span class="identifier">t</span><span class="special">)</span>
+ <span class="preprocessor">#else</span>
+ <span class="identifier">integer</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">t</span><span class="special">)</span>
+ <span class="preprocessor">#endif</span>
+ <span class="special">{</span>
+ <span class="identifier">type</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">operator</span> <span class="identifier">type</span><span class="special">&amp;</span> <span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">operator</span> <span class="keyword">const</span> <span class="identifier">type</span><span class="special">&amp;</span> <span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</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">Type</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">modpow_ctx</span><span class="special">&lt;</span><span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="special">:</span>
+ <span class="identifier">modpow_ctx</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;</span>
+<span class="special">{};</span>
+
+<span class="comment">// returns base^exp % mod
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Type</span><span class="special">&gt;</span>
+<span class="keyword">inline</span>
+<span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;</span> <span class="identifier">modpow</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;&amp;</span> <span class="identifier">base</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;&amp;</span> <span class="identifier">exp</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;&amp;</span> <span class="identifier">mod</span><span class="special">,</span>
+ <span class="identifier">modpow_ctx</span><span class="special">&lt;</span><span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;</span> <span class="special">&gt;*</span> <span class="identifier">ctx</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">modpow</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Type</span><span class="special">&amp;&gt;(</span><span class="identifier">base</span><span class="special">),</span>
+ <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Type</span><span class="special">&amp;&gt;(</span><span class="identifier">exp</span><span class="special">),</span>
+ <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Type</span><span class="special">&amp;&gt;(</span><span class="identifier">mod</span><span class="special">),</span>
+ <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">modpow_ctx</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;*&gt;(</span><span class="identifier">ctx</span><span class="special">));</span>
+<span class="special">}</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">integer</span></code> class template
+ acts as a frontend for a backend type which is given by the <code class="computeroutput"><span class="identifier">Type</span></code>
+ parameter. It simply forwards all member functions and does constructor forwarding.
+ </p>
+</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 © 2008 - 2009 Kevin Sopp<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="implementation_notes.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="unbounded_int_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/performance.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/performance.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,229 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Performance</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="tutorial.html" title="Tutorial">
+<link rel="next" href="implementation_notes.html" title="Implementation notes">
+</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="tutorial.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="implementation_notes.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.performance"></a><a class="link" href="performance.html" title="Performance">Performance</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Tips</span></dt>
+<dt><span class="section">Measurements</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.performance.tips"></a><a class="link" href="performance.html#integer.performance.tips" title="Tips">Tips</a>
+</h3></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ A statement like
+<pre class="programlisting"><span class="identifier">x</span> <span class="special">=</span> <span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span><span class="special">;</span></pre>
+ involves the creation of a temporary <code class="computeroutput"><span class="identifier">mp_int</span></code>
+ inside <code class="computeroutput"><span class="keyword">operator</span> <span class="special">+</span></code>
+ because it is not able to write the result directly into <code class="computeroutput"><span class="identifier">x</span></code> which may already have enough memory
+ allocated to hold the result. Instead rewrite it into
+<pre class="programlisting"><span class="identifier">x</span> <span class="special">=</span> <span class="identifier">a</span><span class="special">;</span>
+<span class="identifier">x</span> <span class="special">+=</span> <span class="identifier">b</span><span class="special">;</span>
+</pre>
+ This trick proves to be useful only for simple operations like addition
+ and subtraction.
+ </li>
+<li>
+ In operations involving built in integral types, try to use unsigned types,
+ preferrably unsigned types that are as large or smaller than mp_int&lt;&gt;::digit_type.
+ </li>
+<li>
+ Use hexadecimal digits for input and output. Conversion from/to power of
+ two bases uses a O(n) algorithm which is not possible for base 10.
+ </li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.performance.measurements"></a><a class="link" href="performance.html#integer.performance.measurements" title="Measurements">Measurements</a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_">AMD
+ Athlon XP 2000+</a></span></dt></dl></div>
+<p>
+ A benchmark program is supplied with Boost.Mp_math under libs/mp_math/tools/benchmark.
+ This benchmark compares some primitive operations of different multi precision
+ integer libraries. It creates detailed result files and uses gnuplot
+ to create graphs.
+ </p>
+<p>
+ Example invocations:
+ </p>
+<pre class="programlisting">benchmark // runs all benches
+benchmark --help
+benchmark --ops="add subtract multiply" --libs="boost.mp_math libtommath"
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="integer.performance.measurements.amd_athlon_xp_2000_"></a><a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_" title="AMD Athlon XP 2000+">AMD
+ Athlon XP 2000+</a>
+</h4></div></div></div>
+<pre class="programlisting">Operating System: Arch Linux (i686), Kernel 2.6.26, glibc 2.8
+Compiler: gcc-4.3.2
+</pre>
+<p>
+ Libraries being compared:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Boost.Mp_math-1_37
+ <div class="itemizedlist"><ul type="circle"><li>
+ switches used: -ftemplate-depth-128 -O3 -finline-functions -march=i686
+ -mtune=generic -std=c++0x
+ </li></ul></div>
+</li>
+<li>
+ libtommath-0.41
+ <div class="itemizedlist"><ul type="circle"><li>
+ switches used: -ftemplate-depth-128 -O3 -finline-functions -march=i686
+ -mtune=generic
+ </li></ul></div>
+</li>
+<li>
+ gmp-4.2.2 (precompiled distribution package, uses generic i386 asm and
+ Intel P6 (Pentium Pro) asm where available)
+ <div class="itemizedlist"><ul type="circle"><li>
+ switches used: -march=i686 -mtune=generic -O2
+ </li></ul></div>
+</li>
+</ul></div>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.input_vectors"></a><h4>
+<a name="id2662293"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.input_vectors">Input
+ vectors</a>
+ </h4>
+<p>
+ Operand size is measured in number of bits. I chose to vary the operand
+ size for the benchmarks a little to see how well the operation handles
+ inputs of differing sizes. Benchmarks that use only one operand use operand
+ 1. <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/input_vecs.png" alt="input_vecs"></span>
+ </p>
+<p>
+ While input operand 1 grows linearly, input operand 2's size is determined
+ by a modified sine function.
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.construct_from_decimal_string"></a><h4>
+<a name="id2662341"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.construct_from_decimal_string">Construct
+ from decimal string</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/ctor_dec.png" alt="ctor_dec"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.construct_from_hex_string"></a><h4>
+<a name="id2662380"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.construct_from_hex_string">Construct
+ from hex string</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/ctor_hex.png" alt="ctor_hex"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.conversion_to_decimal_string"></a><h4>
+<a name="id2662420"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.conversion_to_decimal_string">Conversion
+ to decimal string</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/to_dec.png" alt="to_dec"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.conversion_to_hex_string"></a><h4>
+<a name="id2662459"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.conversion_to_hex_string">Conversion
+ to hex string</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/to_hex.png" alt="to_hex"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.add"></a><h4>
+<a name="id2662498"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.add">Add</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/add.png" alt="add"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.subtract"></a><h4>
+<a name="id2662534"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.subtract">Subtract</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/subtract.png" alt="subtract"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.multiply"></a><h4>
+<a name="id2662570"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.multiply">Multiply</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/multiply.png" alt="multiply"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.divide"></a><h4>
+<a name="id2662607"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.divide">Divide</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/divide.png" alt="divide"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.modulo"></a><h4>
+<a name="id2662644"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.modulo">Modulo</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/modulo.png" alt="modulo"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.square"></a><h4>
+<a name="id2662680"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.square">Square</a>
+ </h4>
+<p>
+ <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/square.png" alt="square"></span>
+ </p>
+<a name="integer.performance.measurements.amd_athlon_xp_2000_.modular_power"></a><h4>
+<a name="id2662717"></a>
+ <a class="link" href="performance.html#integer.performance.measurements.amd_athlon_xp_2000_.modular_power">Modular
+ Power</a>
+ </h4>
+<p>
+ The operation looks like this: <code class="computeroutput"><span class="identifier">dest</span>
+ <span class="special">=</span> <span class="special">(</span><span class="identifier">op1</span> <span class="special">^</span> <span class="identifier">op1</span><span class="special">)</span> <span class="special">%</span> <span class="identifier">op2</span></code>.
+ This graph uses a logarithmic scale. <span class="inlinemediaobject"><img src="../benchmark_imgs/k7/modpow.png" alt="modpow"></span>
+ </p>
+</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 © 2008 - 2009 Kevin Sopp<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="tutorial.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="implementation_notes.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/primality_tests_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/primality_tests_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,210 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Primality Tests reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="uniform_integer_bits_reference.html" title="uniform_integer_bits reference">
+<link rel="next" href="bibliography.html" title="Bibliography">
+</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="uniform_integer_bits_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bibliography.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.primality_tests_reference"></a><a class="link" href="primality_tests_reference.html" title="Primality Tests reference">Primality Tests reference</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">primality_division_test</span></dt>
+<dt><span class="section">primality_fermat_test</span></dt>
+<dt><span class="section">primality_miller_rabin_test</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.primality_tests_reference.primality_division_test"></a><a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_division_test" title="primality_division_test">primality_division_test</a>
+</h3></div></div></div>
+<p>
+ This function object tests a candidate <code class="computeroutput"><span class="identifier">p</span></code>
+ by repeatedly dividing it by small primes (2, 3, 5, 7, 11...). This is a
+ test that should be used before other more complex tests because it quickly
+ sieves out composite numbers. For example, testing for 2, 5, 7 will eliminate
+ 54% of all numbers, testing for all primes less than 100 eliminates 70%,
+ for all primes less than 256 it is 80%.
+ </p>
+<a name="integer.primality_tests_reference.primality_division_test.synopsis"></a><h5>
+<a name="id2708338"></a>
+ <a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_division_test.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/integer.hpp&gt;
+</span><span class="keyword">struct</span> <span class="identifier">primality_division_test</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<a name="integer.primality_tests_reference.primality_division_test.members"></a><h4>
+<a name="id2708525"></a>
+ <a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_division_test.members">Members</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Returns true if <code class="computeroutput"><span class="identifier">p</span></code> is probably prime. Returns false if
+ <code class="computeroutput"><span class="identifier">p</span></code> is definitely composite.
+ </li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.primality_tests_reference.primality_fermat_test"></a><a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_fermat_test" title="primality_fermat_test">primality_fermat_test</a>
+</h3></div></div></div>
+<p>
+ This test is based on Fermat's little theorem which states that if an integer
+ <code class="computeroutput"><span class="identifier">p</span></code> is prime, then for all
+ integers <code class="computeroutput"><span class="identifier">a</span></code> where 0 &lt;
+ <code class="computeroutput"><span class="identifier">a</span></code> &lt; <code class="computeroutput"><span class="identifier">p</span></code>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">a</span><span class="special">**(</span><span class="identifier">p</span><span class="special">-</span><span class="number">1</span><span class="special">)</span> <span class="special">=</span> <span class="number">1</span>
+ <span class="special">(</span><span class="identifier">mod</span>
+ <span class="identifier">p</span><span class="special">)</span></code>
+ </p>
+<p>
+ an alternative formulation is
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">a</span><span class="special">**</span><span class="identifier">p</span> <span class="special">=</span> <span class="identifier">a</span>
+ <span class="special">(</span><span class="identifier">mod</span>
+ <span class="identifier">p</span><span class="special">)</span></code>
+ </p>
+<p>
+ For each round the test creates a random base <code class="computeroutput"><span class="identifier">a</span></code>
+ and checks if the condition holds. There is a class of pseudoprimes called
+ carmichael numbers which are less likely though not impossible with enough
+ rounds to be detected by this test.
+ </p>
+<a name="integer.primality_tests_reference.primality_fermat_test.synopsis"></a><h5>
+<a name="id2708905"></a>
+ <a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_fermat_test.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/integer.hpp&gt;
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Distribution</span> <span class="special">=</span> <span class="identifier">uniform_integer</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">primality_fermat_test</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">Distribution</span> <span class="identifier">distribution_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">primality_fermat_test</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">rounds</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Engine</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Engine</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<a name="integer.primality_tests_reference.primality_fermat_test.members"></a><h4>
+<a name="id2709230"></a>
+ <a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_fermat_test.members">Members</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">primality_fermat_test</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">r</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Constructs a <code class="computeroutput"><span class="identifier">primality_fermat_test</span></code>
+ object with the number of test rounds given by <code class="computeroutput"><span class="identifier">r</span></code>.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Engine</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Engine</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Returns true if <code class="computeroutput"><span class="identifier">p</span></code> is probably prime. Returns false if
+ <code class="computeroutput"><span class="identifier">p</span></code> is definitely composite.
+ </li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.primality_tests_reference.primality_miller_rabin_test"></a><a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_miller_rabin_test" title="primality_miller_rabin_test">primality_miller_rabin_test</a>
+</h3></div></div></div>
+<p>
+ This test is an improved version of the Fermat primality test that will also
+ detect carmichael numbers.
+ </p>
+<a name="integer.primality_tests_reference.primality_miller_rabin_test.synopsis"></a><h5>
+<a name="id2709540"></a>
+ <a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_miller_rabin_test.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/integer.hpp&gt;
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Distribution</span> <span class="special">=</span> <span class="identifier">uniform_integer</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">primality_miller_rabin_test</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">Distribution</span> <span class="identifier">distribution_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">primality_miller_rabin_test</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">r</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Engine</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Engine</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">recommended_number_of_rounds</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">bits</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<a name="integer.primality_tests_reference.primality_miller_rabin_test.members"></a><h4>
+<a name="id2709918"></a>
+ <a class="link" href="primality_tests_reference.html#integer.primality_tests_reference.primality_miller_rabin_test.members">Members</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">primality_miller_rabin_test</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">r</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Constructs a <code class="computeroutput"><span class="identifier">primality_miller_rabin_test</span></code>
+ object with the number of test rounds given by <code class="computeroutput"><span class="identifier">r</span></code>.
+ If <code class="computeroutput"><span class="identifier">r</span> <span class="special">==</span>
+ <span class="number">0</span></code> then each invocation of this function
+ object will use the recommended number of rounds.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Engine</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Engine</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">p</span></code>
+ is odd.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Returns true if <code class="computeroutput"><span class="identifier">p</span></code> is probably prime. Returns false if
+ <code class="computeroutput"><span class="identifier">p</span></code> is definitely composite.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">recommended_number_of_rounds</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">bits</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Returns the recommended number
+ of rounds for a number of precision <code class="computeroutput"><span class="identifier">bits</span></code>
+ so that the probability of error is less than 2^-96.
+ </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 © 2008 - 2009 Kevin Sopp<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="uniform_integer_bits_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bibliography.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/tutorial.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/tutorial.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,311 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Tutorial</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="../index.html" title="Chapter 1. integer">
+<link rel="next" href="performance.html" title="Performance">
+</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/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="performance.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.tutorial"></a><a class="link" href="tutorial.html" title="Tutorial">Tutorial</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">General use</span></dt>
+<dt><span class="section"><a href="tutorial.html#integer.tutorial.random_number_generation">Random number
+ generation</a></span></dt>
+<dt><span class="section">Primality testing</span></dt>
+<dt><span class="section"><a href="tutorial.html#integer.tutorial.prime_number_generation">Prime number
+ generation</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#integer.tutorial.using_the_gmp_backend">Using the GMP
+ backend</a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.tutorial.general_use"></a><a class="link" href="tutorial.html#integer.tutorial.general_use" title="General use">General use</a>
+</h3></div></div></div>
+<p>
+ The only header you need to include to use the library is <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mp_math</span><span class="special">/</span><span class="identifier">integer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>.
+ This is a header-only library so deployment is easy. All functions and types
+ of this library live in namespace <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mp_math</span></code>.
+ </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">string</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">mp_math</span><span class="special">/</span><span class="identifier">integer</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">mp_math</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">std</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="comment">// init from string
+</span> <span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">x</span><span class="special">(</span><span class="string">"93423894782394782347823947289374"</span><span class="special">);</span>
+ <span class="comment">// init from integral type
+</span> <span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">y</span> <span class="special">=</span> <span class="number">2340</span><span class="special">;</span>
+ <span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">z</span> <span class="special">=</span> <span class="identifier">x</span> <span class="special">*</span> <span class="identifier">y</span><span class="special">;</span>
+
+ <span class="comment">// stream output reacts to stream flags
+</span> <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">hex</span> <span class="special">&lt;&lt;</span> <span class="identifier">z</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// automatic detection of radix using the base prefix 0x
+</span> <span class="identifier">z</span> <span class="special">=</span> <span class="string">"0xaaaabbbbccccddddeeeeffff222255557777"</span><span class="special">;</span>
+
+ <span class="identifier">z</span> <span class="special">/=</span> <span class="identifier">y</span><span class="special">;</span>
+
+ <span class="comment">// explicit conversion to string according to formatting flags
+</span> <span class="identifier">string</span> <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">.</span><span class="identifier">to_string</span><span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;(</span><span class="identifier">ios</span><span class="special">::</span><span class="identifier">hex</span> <span class="special">|</span> <span class="identifier">ios</span><span class="special">::</span><span class="identifier">showbase</span><span class="special">);</span>
+ <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">s</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="identifier">z</span> <span class="special">-=</span> <span class="identifier">z</span><span class="special">;</span>
+
+ <span class="comment">// explicit conversion to built in integral types - this will throw
+</span> <span class="comment">// std::overflow_error if int does not have enough precision to hold the
+</span> <span class="comment">// result
+</span> <span class="keyword">int</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">.</span><span class="identifier">to_integral</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;();</span>
+
+ <span class="keyword">return</span> <span class="identifier">result</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ In most cases the <code class="computeroutput"><span class="identifier">integer</span></code>
+ type will behave like a built in integral type.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.tutorial.random_number_generation"></a><a class="link" href="tutorial.html#integer.tutorial.random_number_generation" title="Random number generation">Random number
+ generation</a>
+</h3></div></div></div>
+<p>
+ The random number generators have interfaces similar to Boost.Random. Including
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">random</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ is not necessary because it is used internally by the <code class="computeroutput"><span class="identifier">integer</span></code>
+ random machinery. The random number engine <code class="computeroutput"><span class="identifier">mt19937</span></code>
+ that we use from here on lives in namespace <code class="computeroutput"><span class="identifier">boost</span></code>.
+ </p>
+<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">min</span><span class="special">(</span><span class="number">0U</span><span class="special">);</span>
+<span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">max</span><span class="special">(</span><span class="string">"0x8974651231456456564"</span><span class="special">);</span>
+
+<span class="identifier">uniform_mp_int</span><span class="special">&lt;&gt;</span> <span class="identifier">generator</span><span class="special">(</span><span class="identifier">min</span><span class="special">,</span> <span class="identifier">max</span><span class="special">);</span>
+
+<span class="comment">// Choose a random number engine.
+</span><span class="identifier">mt19937</span> <span class="identifier">e</span><span class="special">;</span>
+
+<span class="comment">// Now generate a random number.
+</span><span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">generator</span><span class="special">(</span><span class="identifier">e</span><span class="special">);</span>
+</pre>
+<p>
+ Another probably more useful alternative is to generate random numbers of
+ a certain precision measured in bits.
+ </p>
+<pre class="programlisting"><span class="comment">// A generator for 2048 bit integers.
+</span><span class="identifier">uniform_mp_int_bits</span><span class="special">&lt;&gt;</span> <span class="identifier">generator</span><span class="special">(</span><span class="number">2048</span><span class="special">);</span>
+
+<span class="identifier">mt19937</span> <span class="identifier">e</span><span class="special">;</span>
+<span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">generator</span><span class="special">(</span><span class="identifier">e</span><span class="special">);</span>
+</pre>
+<p>
+ Note that the numbers will always be 2048 bits large, i.e. the 2048th bit
+ is always set to 1.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.tutorial.primality_testing"></a><a class="link" href="tutorial.html#integer.tutorial.primality_testing" title="Primality testing">Primality testing</a>
+</h3></div></div></div>
+<p>
+ Currently all primality tests in this library are probabilistic. A probabilistic
+ primality test cannot ascertain that a prime candidate p is really prime.
+ It can however ascertain that it is a composite number.
+ </p>
+<p>
+ Here we will learn how to test a number <code class="computeroutput"><span class="identifier">p</span></code>
+ for primality using the fermat primality test. We use boost::bind to bind
+ the random number engine to the test functor. That is necessary because the
+ test functor's function invocation operator needs the random number engine.
+ The operator looks like this:
+ </p>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Engine</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ We need to bind the random number engine to the first parameter slot. Let's
+ do it!
+ </p>
+<pre class="programlisting"><span class="comment">// Create the fermat test functor with 4 rounds of testing.
+</span><span class="identifier">primality_fermat_test</span><span class="special">&lt;&gt;</span> <span class="identifier">test</span><span class="special">(</span><span class="number">4</span><span class="special">);</span>
+
+<span class="comment">// Create a random number engine.
+</span><span class="identifier">mt19937</span> <span class="identifier">rng</span><span class="special">;</span>
+
+<span class="comment">// Create a random 1024 bit candidate number.
+</span><span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">p</span> <span class="special">=</span> <span class="identifier">uniform_mp_int_bits</span><span class="special">&lt;&gt;(</span><span class="number">1024</span><span class="special">)(</span><span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">bool</span> <span class="identifier">is_p_prime</span> <span class="special">=</span> <span class="identifier">is_prime</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="identifier">bind</span><span class="special">(</span><span class="identifier">test</span><span class="special">,</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">_1</span><span class="special">));</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.tutorial.prime_number_generation"></a><a class="link" href="tutorial.html#integer.tutorial.prime_number_generation" title="Prime number generation">Prime number
+ generation</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">prime_generator</span></dt>
+<dt><span class="section">safe_prime_generator</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="integer.tutorial.prime_number_generation.prime_generator"></a><a class="link" href="tutorial.html#integer.tutorial.prime_number_generation.prime_generator" title="prime_generator">prime_generator</a>
+</h4></div></div></div>
+<p>
+ First we will look at how to generate prime numbers using a simple trial
+ division test. What this means is that the prime generator creates a random
+ number and then repeatedly divides it by small primes until it finds a
+ number that passes this test.
+ </p>
+<pre class="programlisting"><span class="comment">// Create a generator for 2048 bit primes.
+</span><span class="identifier">prime_generator</span><span class="special">&lt;</span><span class="identifier">primality_division_test</span><span class="special">&gt;</span> <span class="identifier">generator</span><span class="special">(</span><span class="number">2048</span><span class="special">);</span>
+
+<span class="comment">// Create a random number engine.
+</span><span class="identifier">mt19937</span> <span class="identifier">rng</span><span class="special">;</span>
+
+<span class="comment">// Now create a prime.
+</span><span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">prime</span> <span class="special">=</span> <span class="identifier">generator</span><span class="special">(</span><span class="identifier">rng</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="integer.tutorial.prime_number_generation.safe_prime_generator"></a><a class="link" href="tutorial.html#integer.tutorial.prime_number_generation.safe_prime_generator" title="safe_prime_generator">safe_prime_generator</a>
+</h4></div></div></div>
+<p>
+ A safe prime is a prime <code class="computeroutput"><span class="identifier">p</span></code>
+ for which <code class="computeroutput"><span class="special">(</span><span class="identifier">p</span><span class="special">-</span><span class="number">1</span><span class="special">)/</span><span class="number">2</span></code> is also prime. Such prime numbers are much
+ rarer and thus take longer to generate.
+ </p>
+<p>
+ Now we will look at how to use a more sophisticated primality test like
+ <code class="computeroutput"><span class="identifier">primality_miller_rabin_test</span></code>
+ for prime number generation. It is very useful to combine this test with
+ the <code class="computeroutput"><span class="identifier">primality_division_test</span></code>.
+ This will involve a bit of code, mostly because <code class="computeroutput"><span class="identifier">primality_miller_rabin_test</span></code>
+ and <code class="computeroutput"><span class="identifier">safe_prime_generator</span></code>
+ require a random number generator. The latter needs randomness to create
+ a candidate to test for primality and the miller rabin test needs randomness
+ to test the candidate effectively.
+ </p>
+<pre class="programlisting"><span class="comment">// Define a function object that checks a prime candidate p first with a trial
+</span><span class="comment">// division and then with the miller-rabin algorithm. For ease of use we give
+</span><span class="comment">// it default template arguments.
+</span><span class="comment">// It does not hold a reference to the random number engine because that could
+</span><span class="comment">// lead to lifetime problems.
+</span><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Engine</span> <span class="special">=</span> <span class="identifier">mt19937</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Distribution</span> <span class="special">=</span> <span class="identifier">uniform_integer_bits</span><span class="special">&lt;&gt;</span>
+<span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">primality_test</span>
+<span class="special">{</span>
+ <span class="identifier">primality_division_test</span> <span class="identifier">test1</span><span class="special">;</span>
+ <span class="identifier">primality_miller_rabin_test</span><span class="special">&lt;</span><span class="identifier">Distribution</span><span class="special">&gt;</span> <span class="identifier">test2</span><span class="special">;</span>
+ <span class="identifier">Engine</span> <span class="identifier">rng</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">tester</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Engine</span><span class="special">&amp;</span> <span class="identifier">e</span> <span class="special">=</span> <span class="identifier">Engine</span><span class="special">())</span> <span class="special">:</span> <span class="identifier">rng</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span> <span class="special">{}</span>
+
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">integer</span><span class="special">&lt;&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">test1</span><span class="special">(</span><span class="identifier">p</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">test2</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">p</span><span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="comment">// Create a random number engine that we will feed to the different
+</span><span class="comment">// algorithms.
+</span><span class="identifier">mt19937</span> <span class="identifier">rng</span><span class="special">;</span>
+
+<span class="comment">// Create a generator for safe primes with 128 bits precision.
+</span><span class="keyword">typedef</span> <span class="identifier">safe_prime_generator</span><span class="special">&lt;</span><span class="identifier">primality_test</span><span class="special">&lt;&gt;,</span> <span class="identifier">uniform_integer_bits</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+ <span class="identifier">generator_type</span><span class="special">;</span>
+
+<span class="identifier">generator_type</span> <span class="identifier">generator</span><span class="special">(</span><span class="number">128</span><span class="special">,</span> <span class="identifier">primality_test</span><span class="special">&lt;&gt;(</span><span class="identifier">rng</span><span class="special">));</span>
+
+<span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="identifier">prime</span> <span class="special">=</span> <span class="identifier">generator</span><span class="special">(</span><span class="identifier">rng</span><span class="special">);</span>
+</pre>
+<p>
+ Remember, the generated numbers are <span class="emphasis"><em>probably</em></span> prime.
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="integer.tutorial.using_the_gmp_backend"></a><a class="link" href="tutorial.html#integer.tutorial.using_the_gmp_backend" title="Using the GMP backend">Using the GMP
+ backend</a>
+</h3></div></div></div>
+<p>
+ First, in addition to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mp_math</span><span class="special">/</span><span class="identifier">integer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ include the file <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mp_math</span><span class="special">/</span><span class="identifier">gmp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>.
+ Then define your integer type like this:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mp_math</span><span class="special">::</span><span class="identifier">integer</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mp_math</span><span class="special">::</span><span class="identifier">gmp_integer</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">gmp_int_type</span><span class="special">;</span>
+</pre>
+<p>
+ You then need to link manually to the GMP library.
+ </p>
+<p>
+ This type is more limited than the native backend:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ does not work with the primality tests and the random number generation
+ templates
+ </li>
+<li>
+ a few other things don't work yet or don't work correctly
+ </li>
+</ul></div>
+<p>
+ and features slightly different semantics:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ will default initialize to zero
+ </li>
+<li>
+ will behave on bitwise operations like a two's complement integer
+ </li>
+</ul></div>
+<p>
+ and it has the annoying C gotcha of raising a signal on division by zero.
+ I am not sure about the repercussions of catching that signal and translating
+ it to a C++ exception, so I'm just leaving it as it is right now. In addition
+ to that you will have to be prepared to catch exceptions thrown by the C++
+ wrapper code.
+ </p>
+</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 © 2008 - 2009 Kevin Sopp<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/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="performance.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/unbounded_int_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/unbounded_int_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,2101 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>unbounded_int reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="integer_reference.html" title="integer reference">
+<link rel="next" href="unbounded_traits_reference.html" title="unbounded_traits 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="integer_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="unbounded_traits_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.unbounded_int_reference"></a><a class="link" href="unbounded_int_reference.html" title="unbounded_int reference">unbounded_int reference</a>
+</h2></div></div></div>
+<a name="integer.unbounded_int_reference.synopsis"></a><h4>
+<a name="id2665293"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.synopsis">Synopsis</a>
+ </h4>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/unbounded_int.hpp&gt;
+</span><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">mp_math</span> <span class="special">{</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="keyword">void</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Traits</span> <span class="special">=</span> <span class="identifier">unbounded_traits</span><span class="special">&lt;&gt;</span>
+<span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">unbounded_int</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">multiprecision_integer_tag</span> <span class="identifier">tag</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">Alloc</span> <span class="identifier">allocator_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Traits</span> <span class="identifier">traits_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">traits_type</span><span class="special">::</span><span class="identifier">digit_type</span> <span class="identifier">digit_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">allocator_type</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">const_iterator</span> <span class="identifier">const_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">reverse_iterator</span> <span class="identifier">reverse_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">const_reverse_iterator</span> <span class="identifier">const_reverse_iterator</span><span class="special">;</span>
+
+ <span class="comment">// ctor/cctor/dtor/assign
+</span> <span class="identifier">unbounded_int</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(),</span>
+ <span class="keyword">typename</span> <span class="identifier">enable_if</span><span class="special">&lt;</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span><span class="special">*</span> <span class="identifier">dummy</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">alloc</span><span class="special">&gt;&amp;,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">alloc</span><span class="special">&gt;&amp;,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">RandomAccessIterator</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">RandomAccessIterator</span> <span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">RandomAccessIterator</span> <span class="identifier">last</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">RandomAccessIterator</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">RandomAccessIterator</span> <span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">RandomAccessIterator</span> <span class="identifier">last</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ApInt</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ApInt</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">enable_if</span><span class="special">&lt;</span>
+ <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">and_</span><span class="special">&lt;</span>
+ <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">not_</span><span class="special">&lt;</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">traits_type</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ApInt</span><span class="special">::</span><span class="identifier">traits_type</span><span class="special">&gt;</span> <span class="special">&gt;,</span>
+ <span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ApInt</span><span class="special">::</span><span class="identifier">tag</span><span class="special">,</span> <span class="identifier">multiprecision_integer_tag</span><span class="special">&gt;</span>
+ <span class="special">&gt;</span>
+ <span class="special">&gt;::</span><span class="identifier">type</span><span class="special">*</span> <span class="identifier">dummy</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
+
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_NO_RVALUE_REFERENCES</span>
+ <span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&amp;&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+ <span class="preprocessor">#endif</span>
+
+ <span class="special">~</span><span class="identifier">unbounded_int</span><span class="special">();</span>
+
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_NO_RVALUE_REFERENCES</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&amp;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="preprocessor">#endif</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">enable_if</span><span class="special">&lt;</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">IntegralT</span><span class="special">&gt;,</span> <span class="identifier">unbounded_int</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">IntegralT</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">charT</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">alloc</span><span class="special">&gt;&amp;);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">assign</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">alloc</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">assign</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">alloc</span><span class="special">&gt;&amp;,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">RandomAccessIterator</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">assign</span><span class="special">(</span><span class="identifier">RandomAccessIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">RandomAccessIterator</span> <span class="identifier">last</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span><span class="special">);</span>
+
+ <span class="comment">// modifiers
+</span> <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="comment">// increment/decrement
+</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">++();</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">--();</span>
+ <span class="identifier">unbounded_int</span> <span class="keyword">operator</span> <span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span> <span class="keyword">operator</span> <span class="special">--(</span><span class="keyword">int</span><span class="special">);</span>
+
+ <span class="comment">// shifting
+</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&lt;&lt;=</span> <span class="special">(</span><span class="identifier">size_type</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&gt;&gt;=</span> <span class="special">(</span><span class="identifier">size_type</span><span class="special">);</span>
+
+ <span class="comment">// unary negate
+</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">();</span>
+
+ <span class="comment">// arithmetic operators
+</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+
+ <span class="comment">// bitwise operators
+</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+
+ <span class="comment">// operators involving integral types
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+
+ <span class="comment">// operators involving character strings
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+ <span class="comment">// operators involving std::basic_string
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+ <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+
+ <span class="comment">// observers
+</span> <span class="identifier">allocator_type</span> <span class="identifier">get_allocator</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">bool</span> <span class="identifier">is_even</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">is_odd</span> <span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">bool</span> <span class="identifier">is_positive</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">is_negative</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">bool</span> <span class="identifier">is_initialized</span> <span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">is_uninitialized</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">size_type</span> <span class="identifier">precision</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_NO_EXPLICIT_CONVERSION_OPERATORS</span>
+ <span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="preprocessor">#else</span>
+ <span class="keyword">explicit</span> <span class="keyword">operator</span> <span class="keyword">bool</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">to_string</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">dec</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+ <span class="identifier">IntegralT</span> <span class="identifier">to_integral</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="comment">// low level access
+</span> <span class="identifier">digit_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">[](</span><span class="identifier">size_type</span> <span class="identifier">i</span><span class="special">);</span>
+ <span class="keyword">const</span> <span class="identifier">digit_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">[](</span><span class="identifier">size_type</span> <span class="identifier">i</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">digit_type</span><span class="special">&amp;</span> <span class="identifier">at</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">i</span><span class="special">);</span>
+ <span class="keyword">const</span> <span class="identifier">digit_type</span><span class="special">&amp;</span> <span class="identifier">at</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">i</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">clamp</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">clamp_high_digit</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">set_bit</span> <span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">bit</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">clear_bit</span> <span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">bit</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">set_bits</span> <span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">beg</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="identifier">end</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">clear_bits</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">beg</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="identifier">end</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">truncate</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">prec</span><span class="special">);</span>
+
+ <span class="identifier">size_type</span> <span class="identifier">precision</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">void</span> <span class="identifier">set_precision</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">bits</span><span class="special">);</span>
+
+ <span class="identifier">size_type</span> <span class="identifier">count_trailing_zero_bits</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">print</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">all</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+
+
+<span class="comment">// non-member functions
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">size_type</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&gt;&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">size_type</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">+</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">*</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">/</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">%</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">|</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&amp;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">^</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">+</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">*</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">/</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">%</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">|</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&amp;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">^</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+
+<span class="comment">// Comparison operators
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="comment">// Comparison between unbounded_int and std::basic_string
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="comment">// Comparison between std::basic_string and unbounded_int
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="comment">// Comparison between unbounded_int and const charT*
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="comment">// Comparison between const charT* and unbounded_int
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="comment">// Comparison between unbounded_int and integral type
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="comment">// Comparison between integral type and unbounded_int
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+
+<span class="comment">// Stream I/O
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span>
+<span class="keyword">operator</span> <span class="special">&gt;&gt;</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span>
+<span class="keyword">operator</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+
+
+<span class="comment">// Special functions
+</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">abs</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">gcd</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">b</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">lcm</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">b</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">int</span> <span class="identifier">jacobi</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">pow</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">digit_type</span> <span class="identifier">n</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">pow</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">modpow</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">base</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">exp</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><spa
n class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">mod</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">sqrt</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">nth_root</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">digit_type</span> <span class="identifier">n</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">nth_root</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">);</span>
+
+
+<span class="special">}</span> <span class="comment">// namespace mp_math
+</span><span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<a name="integer.unbounded_int_reference.construction_from___assignment_to_a_string_object"></a><h4>
+<a name="id2682221"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.construction_from___assignment_to_a_string_object">Construction
+ from / assignment to a string object</a>
+ </h4>
+<p>
+ In a constructor or assignment operation without the possibility to specify
+ the base of the string argument the base of the number is deduced from the
+ string prefix.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="number">0</span></code> - octal
+ </li>
+<li>
+<code class="computeroutput"><span class="number">0</span><span class="identifier">x</span></code>,
+ <code class="computeroutput"><span class="number">0</span><span class="identifier">X</span></code>
+ - hexadecimal
+ </li>
+</ul></div>
+<p>
+ An optional <code class="computeroutput"><span class="special">-</span></code> sign is allowed
+ as the first character in the string to indicate a negative value.
+ </p>
+<p>
+ In a constructor or assignment operation with the ability to specify the format
+ of the string argument via a <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">fmtflags</span></code>
+ parameter, possible formatting flags are:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li><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">showbase</span></code></li>
+<li><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">dec</span></code></li>
+<li><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">hex</span></code></li>
+<li><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">oct</span></code></li>
+</ul></div>
+<a name="integer.unbounded_int_reference.construct_copy_destroy_assign"></a><h4>
+<a name="id2682483"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.construct_copy_destroy_assign">Construct/Copy/Destroy/Assign</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an empty <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object, such an uninitialized
+ <code class="computeroutput"><span class="identifier">unbounded_int</span></code> has no value,
+ i.e. it is <span class="emphasis"><em>not</em></span> zero.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an empty <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object and initializes its
+ allocator with <code class="computeroutput"><span class="identifier">a</span></code>, such an
+ uninitialized <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ has no value, i.e. it is <span class="emphasis"><em>not</em></span> zero.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(),</span>
+ <span class="keyword">typename</span> <span class="identifier">enable_if</span><span class="special">&lt;</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span><span class="special">*</span> <span class="identifier">dummy</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from an integral type. The value of the object is that of the integral
+ type.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N) where N is the number of
+ bits of IntegralT.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ points to a valid number formatted as string or to an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from a string.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ points to a valid number formatted according to the flags in <code class="computeroutput"><span class="identifier">f</span></code> or <code class="computeroutput"><span class="identifier">s</span></code>
+ is an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from a string.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character or if an unrecognized formatting flag was set.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ contains a valid number formatted as string or <code class="computeroutput"><span class="identifier">s</span></code>
+ is an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from a string.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ contains a valid number formatted according to the flags in <code class="computeroutput"><span class="identifier">f</span></code> or <code class="computeroutput"><span class="identifier">s</span></code>
+ is an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from a string.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character or if an unrecognized formatting flag was set.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">RandomAccessIterator</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">RandomAccessIterator</span> <span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">RandomAccessIterator</span> <span class="identifier">last</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">first</span></code>
+ and <code class="computeroutput"><span class="identifier">last</span></code> are iterators into
+ a string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from two iterators.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">RandomAccessIterator</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">RandomAccessIterator</span> <span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">RandomAccessIterator</span> <span class="identifier">last</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">allocator_type</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">());</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">first</span></code>
+ and <code class="computeroutput"><span class="identifier">last</span></code> are iterators into
+ a string formatted according to the formatting flags in <code class="computeroutput"><span class="identifier">f</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from two iterators.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character or if an unrecognized formatting flag was set.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs a copy of a given <code class="computeroutput"><span class="identifier">unbounded_int</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N), where N is the number
+ of digits in <code class="computeroutput"><span class="identifier">copy</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&amp;&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ by moving <code class="computeroutput"><span class="identifier">copy</span></code> into <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="special">~</span><span class="identifier">unbounded_int</span><span class="special">();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Destroys <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Copies the value of <code class="computeroutput"><span class="identifier">rhs</span></code> into <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&amp;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> obtains the value of <code class="computeroutput"><span class="identifier">rhs</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">rhs</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> obtains the value of <code class="computeroutput"><span class="identifier">rhs</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> basic.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ points to a valid number formatted as string or to an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">=</span> <span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> basic.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ points to a valid number formatted as string or to an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">=</span> <span class="identifier">unbounded_int</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> basic.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">assign</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ points to a valid number formatted according to the flags in <code class="computeroutput"><span class="identifier">f</span></code> or <code class="computeroutput"><span class="identifier">s</span></code>
+ is an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from a string.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character or if an unrecognized formatting flag was set.
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> basic.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">assign</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">s</span></code>
+ contains a valid number formatted according to the flags in <code class="computeroutput"><span class="identifier">f</span></code> or <code class="computeroutput"><span class="identifier">s</span></code>
+ is an empty string.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from a string.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character or if an unrecognized formatting flag was set.
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> basic.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">RandomAccessIterator</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">assign</span><span class="special">(</span><span class="identifier">RandomAccessIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">RandomAccessIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">first</span></code>
+ and <code class="computeroutput"><span class="identifier">last</span></code> are iterators into
+ a string formatted according to the formatting flags in <code class="computeroutput"><span class="identifier">f</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs an <code class="computeroutput"><span class="identifier">unbounded_int</span></code>
+ object from two iterators.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character or if an unrecognized formatting flag was set.
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> basic.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.modifiers"></a><h4>
+<a name="id2686573"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.modifiers">Modifiers</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Swaps the value of <code class="computeroutput"><span class="identifier">other</span></code> and <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> nothrow.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Swaps the value of <code class="computeroutput"><span class="identifier">other</span></code> and <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> nothrow.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.increment_decrement"></a><h4>
+<a name="id2686792"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.increment_decrement">Increment/decrement</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">++();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span><pre class="programlisting"><span class="special">*</span><span class="keyword">this</span> <span class="special">+=</span> <span class="number">1</span><span class="special">;</span>
+<span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span>
+</pre>
+</li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> best case is O(1), worst case
+ is O(N) - this happens when the addition causes a carry bit to ripple through
+ all digits subsequently.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">--();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span><pre class="programlisting"><span class="special">*</span><span class="keyword">this</span> <span class="special">-=</span> <span class="number">1</span><span class="special">;</span>
+<span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span>
+</pre>
+</li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> best case is O(1), worst case
+ is O(N) - this happens when the subtraction causes a borrow bit to ripple
+ through all digits subsequently.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span> <span class="keyword">operator</span> <span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span><pre class="programlisting"><span class="identifier">unbounded_int</span> <span class="identifier">tmp</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+<span class="special">*</span><span class="keyword">this</span> <span class="special">+=</span> <span class="number">1</span><span class="special">;</span>
+<span class="keyword">return</span> <span class="identifier">tmp</span><span class="special">;</span>
+</pre>
+</li>
+<li>
+<span class="bold"><strong>Returns:</strong></span> The value of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> before incrementation.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span> <span class="keyword">operator</span> <span class="special">--(</span><span class="keyword">int</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span><pre class="programlisting"><span class="identifier">unbounded_int</span> <span class="identifier">tmp</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+<span class="special">*</span><span class="keyword">this</span> <span class="special">-=</span> <span class="number">1</span><span class="special">;</span>
+<span class="keyword">return</span> <span class="identifier">tmp</span><span class="special">;</span>
+</pre>
+</li>
+<li>
+<span class="bold"><strong>Returns:</strong></span> The value of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> before decrementation.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.shifting"></a><h4>
+<a name="id2687520"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.shifting">Shifting</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&lt;&lt;=</span> <span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Shift <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> by <code class="computeroutput"><span class="identifier">x</span></code>
+ bits to the left.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&gt;&gt;=</span> <span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Shift <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> by <code class="computeroutput"><span class="identifier">x</span></code>
+ bits to the right.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.unary_negate"></a><h4>
+<a name="id2687858"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.unary_negate">Unary negate</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Negates <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> nothrow.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.arithmetic_operators"></a><h4>
+<a name="id2687983"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.arithmetic_operators">Arithmetic
+ operators</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Adds <code class="computeroutput"><span class="identifier">x</span></code>
+ to <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Subtracts <code class="computeroutput"><span class="identifier">x</span></code>
+ from <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Multiplies <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> by <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> If <code class="computeroutput"><span class="special">&amp;</span><span class="identifier">x</span> <span class="special">==</span> <span class="keyword">this</span></code>
+ then a squaring algorithm will be used. Different multiplication algorithms
+ are chosen for numbers of different size. The thresholds can be tuned via
+ the <code class="computeroutput"><span class="identifier">unbounded_int_traits</span></code>
+ class template parameter.
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ Small numbers: Comba algorithm O(N^2).
+ </li>
+<li>
+ Midsize numbers: Karatsuba algorithm O(N^log2(3)) ~ O(N^1.585).
+ </li>
+<li>
+ Large numbers: Toom-Cook algorithm O(N^(log(5)/log(3))) ~ O(N^1.465).
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">!=</span> <span class="number">0</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Divides <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> by <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">domain_error</span></code> if <code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">==</span> <span class="number">0</span></code>.
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">!=</span> <span class="number">0</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Modulus <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> by <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">domain_error</span></code> if <code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">==</span> <span class="number">0</span></code>.
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.bitwise_operators"></a><h4>
+<a name="id2689046"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.bitwise_operators">Bitwise operators</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> OR <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> AND <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> XOR <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.operators_involving_integral_types"></a><h4>
+<a name="id2689571"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.operators_involving_integral_types">Operators
+ involving integral types</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Adds <code class="computeroutput"><span class="identifier">x</span></code>
+ to <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Subtracts <code class="computeroutput"><span class="identifier">x</span></code>
+ to <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Multiplies <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> by <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Divides <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> by <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> modulo <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Applies the bitwise or operation
+ on <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>
+ and the absolute of <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Applies the bitwise and operation
+ on <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>
+ and the absolute of <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="identifier">IntegralT</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Applies the bitwise xor operation
+ on <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>
+ and the absolute of <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.operators_involving_chart_strings"></a><h4>
+<a name="id2690986"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.operators_involving_chart_strings">Operators
+ involving charT strings</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">s</span><span class="special">);</span>
+</pre>
+<a name="integer.unbounded_int_reference.operators_involving_std__basic_string"></a><h4>
+<a name="id2691634"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.operators_involving_std__basic_string">Operators
+ involving std::basic_string</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">-=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">*=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">/=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">%=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">|=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">&amp;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">^=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
+</pre>
+<a name="integer.unbounded_int_reference.observers"></a><h4>
+<a name="id2692827"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.observers">Observers</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">allocator_type</span> <span class="identifier">get_allocator</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns: </strong></span> A copy of the allocator.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing if allocator copy constructor
+ is nothrow.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">is_even</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">is_odd</span> <span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">is_positive</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">is_negative</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">size_type</span> <span class="identifier">precision</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The number of bits used by the
+ absolute value of *this.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(N).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">!=</span> <span class="number">0</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">to_string</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">fmtflags</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">dec</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Converts <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>,
+ formatting of the string is done according to the <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">fmtflags</span></code>
+ parameter. Possible formatting flags are:
+ <div class="itemizedlist"><ul type="circle">
+<li><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">showpos</span></code></li>
+<li><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">showbase</span></code></li>
+<li><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">dec</span></code></li>
+<li><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">hex</span></code></li>
+<li><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">oct</span></code></li>
+<li><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">uppercase</span></code></li>
+</ul></div>
+</li>
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> converted to a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
+ object.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">IntegralT</span> <span class="identifier">to_integral</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> converted to an object of type <code class="computeroutput"><span class="identifier">IntegralT</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
+ if <code class="computeroutput"><span class="identifier">IntegralT</span></code> does not have
+ enough precision to hold the result.
+ </li>
+<li>
+<span class="bold"><strong>Exception safety:</strong></span> strong.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.non_member_functions"></a><h4>
+<a name="id2693891"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.non_member_functions">Non-member
+ functions</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;&amp;,</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">size_type</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&gt;&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">size_type</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">+</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">*</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">/</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">%</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">|</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&amp;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">^</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">+</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">-</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">*</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">/</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">%</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">|</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">&amp;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="special">^</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+</pre>
+<p>
+ These functions are implemented in terms of their respective member functions.
+ </p>
+<a name="integer.unbounded_int_reference.comparison_operators"></a><h4>
+<a name="id2696864"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.comparison_operators">Comparison
+ operators</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> These operators compare the numeric
+ value of their arguments and return a truth value based on that evaluation.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span> Nothing.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Converts the string argument to
+ an <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object and
+ compares it to the object on the left side of the expression.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Converts the string argument to
+ an <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object and
+ compares it to the object on the right side of the expression.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Converts the string argument to
+ an <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object and
+ compares it to the object on the left side of the expression.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Converts the string argument to
+ an <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object and
+ compares it to the object on the right side of the expression.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">invalid_argument</span></code> if the string contains
+ an invalid character.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;,</span> <span class="identifier">IntegralT</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Converts the integral argument
+ to an <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object
+ and compares it to the object on the left side of the expression.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&lt;=</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IntegralT</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">&gt;=</span> <span class="special">(</span><span class="identifier">IntegralT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Effects:</strong></span> Converts the integral argument
+ to an <code class="computeroutput"><span class="identifier">unbounded_int</span></code> object
+ and compares it to the object on the right side of the expression.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<a name="integer.unbounded_int_reference.stream_i_o"></a><h4>
+<a name="id2703545"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.stream_i_o">Stream I/O</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span>
+<span class="keyword">operator</span> <span class="special">&gt;&gt;</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span>
+<span class="keyword">operator</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<a name="integer.unbounded_int_reference.special_functions"></a><h4>
+<a name="id2704006"></a>
+ <a class="link" href="unbounded_int_reference.html#integer.unbounded_int_reference.special_functions">Special functions</a>
+ </h4>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">abs</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The positive value of <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(1).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">gcd</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">b</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The greatest common divisor of
+ <code class="computeroutput"><span class="identifier">a</span></code> and <code class="computeroutput"><span class="identifier">b</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O((log2(AB))^2).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">lcm</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">b</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The least common multiple of <code class="computeroutput"><span class="identifier">a</span></code> and <code class="computeroutput"><span class="identifier">b</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O((log2(AB))^2).
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">int</span> <span class="identifier">jacobi</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The Jacobi symbol of integer <code class="computeroutput"><span class="identifier">a</span></code> and positive odd integer <code class="computeroutput"><span class="identifier">p</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">domain_error</span></code> if <code class="computeroutput"><span class="identifier">p</span></code>
+ is negative.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">pow</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">digit_type</span> <span class="identifier">n</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">pow</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The <code class="computeroutput"><span class="identifier">n</span></code>th
+ power of <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">modpow</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">base</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">exp</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">mod</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="special">(</span><span class="identifier">base</span> <span class="special">^</span> <span class="identifier">exp</span><span class="special">)</span> <span class="special">%</span>
+ <span class="identifier">mod</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws: </strong></span><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">sqrt</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The square root of <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">domain_error</span></code> if <code class="computeroutput"><span class="identifier">x</span></code>
+ is negative.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">nth_root</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">digit_type</span> <span class="identifier">n</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">nth_root</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">unbounded_int</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Returns:</strong></span> The <code class="computeroutput"><span class="identifier">n</span></code>th
+ root of <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li>
+<span class="bold"><strong>Complexity:</strong></span> O(log(N)).
+ </li>
+<li>
+<span class="bold"><strong>Throws:</strong></span><div class="itemizedlist"><ul type="circle">
+<li><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code></li>
+<li>
+<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">domain_error</span></code> if <code class="computeroutput"><span class="identifier">x</span></code>
+ is negative and <code class="computeroutput"><span class="identifier">n</span></code> is
+ odd.
+ </li>
+</ul></div>
+</li>
+</ul></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 © 2008 - 2009 Kevin Sopp<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="integer_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="unbounded_traits_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/unbounded_traits_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/unbounded_traits_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,79 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>unbounded_traits reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="unbounded_int_reference.html" title="unbounded_int reference">
+<link rel="next" href="uniform_integer_reference.html" title="uniform_integer 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="unbounded_int_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniform_integer_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.unbounded_traits_reference"></a><a class="link" href="unbounded_traits_reference.html" title="unbounded_traits reference">unbounded_traits reference</a>
+</h2></div></div></div>
+<p>
+ The second template parameter to mp_int is a type which allows to customize
+ some of mp_int's internal workings.
+ </p>
+<a name="integer.unbounded_traits_reference.synopsis"></a><h4>
+<a name="id2706369"></a>
+ <a class="link" href="unbounded_traits_reference.html#integer.unbounded_traits_reference.synopsis">Synopsis</a>
+ </h4>
+<p>
+
+</p>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/integer/unbounded_traits.hpp&gt;
+</span><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<span class="keyword">namespace</span> <span class="identifier">mp_math</span> <span class="special">{</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Digit</span> <span class="special">=</span> <span class="identifier">implementation</span> <span class="identifier">defined</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Word</span> <span class="special">=</span> <span class="identifier">implementation</span> <span class="identifier">defined</span>
+<span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">unbounded_traits</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Digit</span> <span class="identifier">digit_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Word</span> <span class="identifier">word_type</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="identifier">size_type</span> <span class="identifier">toom_mul_cutoff</span><span class="special">;</span> <span class="comment">// default: 350
+</span> <span class="keyword">static</span> <span class="identifier">size_type</span> <span class="identifier">toom_sqr_cutoff</span><span class="special">;</span> <span class="comment">// default: 400
+</span> <span class="keyword">static</span> <span class="identifier">size_type</span> <span class="identifier">karatsuba_mul_cutoff</span><span class="special">;</span> <span class="comment">// default: 80
+</span> <span class="keyword">static</span> <span class="identifier">size_type</span> <span class="identifier">karatsuba_sqr_cutoff</span><span class="special">;</span> <span class="comment">// default: 120
+</span><span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace mp_math
+</span><span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</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 © 2008 - 2009 Kevin Sopp<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="unbounded_int_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniform_integer_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_integer_bits_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_integer_bits_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,103 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>uniform_integer_bits reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="uniform_integer_reference.html" title="uniform_integer reference">
+<link rel="next" href="primality_tests_reference.html" title="Primality Tests 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="uniform_integer_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primality_tests_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.uniform_integer_bits_reference"></a><a class="link" href="uniform_integer_bits_reference.html" title="uniform_integer_bits reference">uniform_integer_bits
+ reference</a>
+</h2></div></div></div>
+<a name="integer.uniform_integer_bits_reference.synopsis"></a><h4>
+<a name="id2707582"></a>
+ <a class="link" href="uniform_integer_bits_reference.html#integer.uniform_integer_bits_reference.synopsis">Synopsis</a>
+ </h4>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/integer.hpp&gt;
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">MpInt</span> <span class="special">=</span> <span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">uniform_integer_bits</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">input_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_fixed_range</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+
+ <span class="identifier">uniform_integer_bits</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MpInt</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">bits</span><span class="special">);</span>
+
+ <span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+ <span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<a name="integer.uniform_integer_bits_reference.members"></a><h4>
+<a name="id2707931"></a>
+ <a class="link" href="uniform_integer_bits_reference.html#integer.uniform_integer_bits_reference.members">Members</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">uniform_integer_bits</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MpInt</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Constructs a <code class="computeroutput"><span class="identifier">uniform_integer_bits</span></code>
+ object. All numbers generated by this object will be <code class="computeroutput"><span class="identifier">x</span></code>
+ bits in size.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The least value of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The greatest value of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Resets the state of the distribution
+ function.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+<span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> A uniform random number <code class="computeroutput"><span class="identifier">x</span></code> in the range <code class="computeroutput"><span class="identifier">min</span>
+ <span class="special">&lt;=</span> <span class="identifier">x</span>
+ <span class="special">&lt;=</span> <span class="identifier">max</span></code>.
+ </li></ul></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 © 2008 - 2009 Kevin Sopp<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="uniform_integer_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primality_tests_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_integer_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_integer_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,109 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>uniform_integer reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="unbounded_traits_reference.html" title="unbounded_traits reference">
+<link rel="next" href="uniform_integer_bits_reference.html" title="uniform_integer_bits 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="unbounded_traits_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniform_integer_bits_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.uniform_integer_reference"></a><a class="link" href="uniform_integer_reference.html" title="uniform_integer reference">uniform_integer reference</a>
+</h2></div></div></div>
+<a name="integer.uniform_integer_reference.synopsis"></a><h4>
+<a name="id2706762"></a>
+ <a class="link" href="uniform_integer_reference.html#integer.uniform_integer_reference.synopsis">Synopsis</a>
+ </h4>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/integer.hpp&gt;
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">MpInt</span> <span class="special">=</span> <span class="identifier">integer</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">uniform_integer</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">input_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_fixed_range</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+
+ <span class="identifier">uniform_integer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">min</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">max</span><span class="special">);</span>
+
+ <span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+ <span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<a name="integer.uniform_integer_reference.members"></a><h4>
+<a name="id2707130"></a>
+ <a class="link" href="uniform_integer_reference.html#integer.uniform_integer_reference.members">Members</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">uniform_integer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">min</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">max</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">min</span>
+ <span class="special">&lt;=</span> <span class="identifier">max</span></code>
+</li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs a <code class="computeroutput"><span class="identifier">uniform_integer</span></code>
+ object. <code class="computeroutput"><span class="identifier">min</span></code> and <code class="computeroutput"><span class="identifier">max</span></code> are the parameters of the distribution.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The <code class="computeroutput"><span class="identifier">min</span></code>
+ parameter of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The <code class="computeroutput"><span class="identifier">max</span></code>
+ parameter of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Resets the state of the distribution
+ function.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+<span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> A uniform random number <code class="computeroutput"><span class="identifier">x</span></code> in the range <code class="computeroutput"><span class="identifier">min</span>
+ <span class="special">&lt;=</span> <span class="identifier">x</span>
+ <span class="special">&lt;=</span> <span class="identifier">max</span></code>.
+ </li></ul></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 © 2008 - 2009 Kevin Sopp<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="unbounded_traits_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniform_integer_bits_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_mp_int_bits_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_mp_int_bits_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,103 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>uniform_mp_int_bits reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="uniform_mp_int_reference.html" title="uniform_mp_int reference">
+<link rel="next" href="primality_tests_reference.html" title="Primality Tests 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="uniform_mp_int_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primality_tests_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.uniform_mp_int_bits_reference"></a><a class="link" href="uniform_mp_int_bits_reference.html" title="uniform_mp_int_bits reference">uniform_mp_int_bits
+ reference</a>
+</h2></div></div></div>
+<a name="integer.uniform_mp_int_bits_reference.synopsis"></a><h4>
+<a name="id3123022"></a>
+ <a class="link" href="uniform_mp_int_bits_reference.html#integer.uniform_mp_int_bits_reference.synopsis">Synopsis</a>
+ </h4>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/mp_int.hpp&gt;
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">MpInt</span> <span class="special">=</span> <span class="identifier">mp_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">uniform_mp_int_bits</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">input_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_fixed_range</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+
+ <span class="identifier">uniform_mp_int_bits</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MpInt</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">bits</span><span class="special">);</span>
+
+ <span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+ <span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<a name="integer.uniform_mp_int_bits_reference.members"></a><h4>
+<a name="id3123370"></a>
+ <a class="link" href="uniform_mp_int_bits_reference.html#integer.uniform_mp_int_bits_reference.members">Members</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">uniform_mp_int_bits</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MpInt</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">x</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Constructs a <code class="computeroutput"><span class="identifier">uniform_mp_int_bits</span></code>
+ object. All numbers generated by this object will be <code class="computeroutput"><span class="identifier">x</span></code>
+ bits in size.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The least value of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The greatest value of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Resets the state of the distribution
+ function.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+<span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> A uniform random number <code class="computeroutput"><span class="identifier">x</span></code> in the range <code class="computeroutput"><span class="identifier">min</span>
+ <span class="special">&lt;=</span> <span class="identifier">x</span>
+ <span class="special">&lt;=</span> <span class="identifier">max</span></code>.
+ </li></ul></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 © 2008 - 2009 Kevin Sopp<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="uniform_mp_int_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primality_tests_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_mp_int_reference.html
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/html/integer/uniform_mp_int_reference.html 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,109 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>uniform_mp_int reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="Chapter 1. integer">
+<link rel="up" href="../index.html" title="Chapter 1. integer">
+<link rel="prev" href="unbounded_traits_reference.html" title="unbounded_traits reference">
+<link rel="next" href="uniform_mp_int_bits_reference.html" title="uniform_mp_int_bits 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="unbounded_traits_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniform_mp_int_bits_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="integer.uniform_mp_int_reference"></a><a class="link" href="uniform_mp_int_reference.html" title="uniform_mp_int reference">uniform_mp_int reference</a>
+</h2></div></div></div>
+<a name="integer.uniform_mp_int_reference.synopsis"></a><h4>
+<a name="id3122203"></a>
+ <a class="link" href="uniform_mp_int_reference.html#integer.uniform_mp_int_reference.synopsis">Synopsis</a>
+ </h4>
+<pre class="programlisting"><span class="comment">// &lt;boost/mp_math/mp_int.hpp&gt;
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">MpInt</span> <span class="special">=</span> <span class="identifier">mp_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">uniform_mp_int</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">input_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">MpInt</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_fixed_range</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+
+ <span class="identifier">uniform_mp_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">min</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">max</span><span class="special">);</span>
+
+ <span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+ <span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<a name="integer.uniform_mp_int_reference.members"></a><h4>
+<a name="id3122571"></a>
+ <a class="link" href="uniform_mp_int_reference.html#integer.uniform_mp_int_reference.members">Members</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">uniform_mp_int</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">min</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">MpInt</span><span class="special">&amp;</span> <span class="identifier">max</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">min</span>
+ <span class="special">&lt;=</span> <span class="identifier">max</span></code>
+</li>
+<li>
+<span class="bold"><strong>Effects:</strong></span> Constructs a <code class="computeroutput"><span class="identifier">uniform_mp_int</span></code>
+ object. <code class="computeroutput"><span class="identifier">min</span></code> and <code class="computeroutput"><span class="identifier">max</span></code> are the parameters of the distribution.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The <code class="computeroutput"><span class="identifier">min</span></code>
+ parameter of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> The <code class="computeroutput"><span class="identifier">max</span></code>
+ parameter of the distribution.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Effects:</strong></span> Resets the state of the distribution
+ function.
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">UniformRandomNumberGenerator</span><span class="special">&gt;</span>
+<span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">UniformRandomNumberGenerator</span><span class="special">&amp;</span> <span class="identifier">urng</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="bold"><strong>Returns:</strong></span> A uniform random number <code class="computeroutput"><span class="identifier">x</span></code> in the range <code class="computeroutput"><span class="identifier">min</span>
+ <span class="special">&lt;=</span> <span class="identifier">x</span>
+ <span class="special">&lt;=</span> <span class="identifier">max</span></code>.
+ </li></ul></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 © 2008 - 2009 Kevin Sopp<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="unbounded_traits_reference.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniform_mp_int_bits_reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/mp_math/libs/mp_math/doc/integer_reference.qbk
==============================================================================
--- (empty file)
+++ sandbox/mp_math/libs/mp_math/doc/integer_reference.qbk 2009-07-13 16:26:23 EDT (Mon, 13 Jul 2009)
@@ -0,0 +1,98 @@
+[/ Copyright Kevin Sopp 2008 - 2009.
+ / 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)]
+
+[section integer reference]
+
+[heading Synopsis]
+
+ // <boost/mp_math/integer.hpp>
+
+ template<class Type = unbounded<> >
+ struct integer : Type
+ {
+ typedef Type type;
+ typedef typename type::traits_type traits_type;
+ typedef typename type::digit_type digit_type;
+ typedef typename type::size_type size_type;
+ typedef typename type::iterator iterator;
+ typedef typename type::const_iterator const_iterator;
+ typedef typename type::reverse_iterator reverse_iterator;
+ typedef typename type::const_reverse_iterator const_reverse_iterator;
+
+ integer(){}
+
+ #if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_NO_RVALUE_REFERENCES)
+ template<typename... Args>
+ integer(Args&&... args)
+ :
+ type(args...)
+ {}
+
+ #else
+
+ template<typename T1>
+ integer(const T1& t1)
+ : type(t1) {}
+
+ template<typename T1, typename T2>
+ integer(const T1& t1, const T2& t2)
+ : type(t1, t2) {}
+
+ template<typename T1, typename T2, typename T3>
+ integer(const T1& t1, const T2& t2, const T3& t3)
+ : type(t1, t2, t3) {}
+
+ template<typename T1, typename T2, typename T3, typename T4>
+ integer(const T1& t1, const T2& t2, const T3& t3, const T4& t4)
+ : type(t1, t2, t3, t4) {}
+
+ template<typename T1, typename T2, typename T3, typename T4, typename T5>
+ integer(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5)
+ : type(t1, t2, t3, t4, t5) {}
+ #endif
+
+ template<typename T>
+ #ifndef BOOST_NO_RVALUE_REFERENCES
+ integer& operator = (T&& t)
+ #else
+ integer& operator = (const T& t)
+ #endif
+ {
+ type::operator=(t);
+ return *this;
+ }
+
+ operator type& () { return *this; }
+ operator const type& () const { return *this; }
+ };
+
+
+ template<class Type>
+ struct modpow_ctx<integer<Type> >
+ :
+ modpow_ctx<Type>
+ {};
+
+ // returns base^exp % mod
+ template<class Type>
+ inline
+ integer<Type> modpow(const integer<Type>& base,
+ const integer<Type>& exp,
+ const integer<Type>& mod,
+ modpow_ctx<integer<Type> >* ctx = 0)
+ {
+ return modpow(static_cast<const Type&>(base),
+ static_cast<const Type&>(exp),
+ static_cast<const Type&>(mod),
+ static_cast<modpow_ctx<Type>*>(ctx));
+ }
+
+
+The `integer` class template acts as a frontend for a backend type which is
+given by the `Type` parameter. It simply forwards all member functions and does
+constructor forwarding.
+
+[endsect][/integer reference]
+


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