Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65930 - sandbox/chrono/libs/ratio/doc/html
From: vicente.botet_at_[hidden]
Date: 2010-10-12 16:02:40


Author: viboes
Date: 2010-10-12 16:02:39 EDT (Tue, 12 Oct 2010)
New Revision: 65930
URL: http://svn.boost.org/trac/boost/changeset/65930

Log:
Ratio:
* Update doc after review
Text files modified:
   sandbox/chrono/libs/ratio/doc/html/index.html | 1740 +++++++++++----------------------------
   1 files changed, 481 insertions(+), 1259 deletions(-)

Modified: sandbox/chrono/libs/ratio/doc/html/index.html
==============================================================================
--- sandbox/chrono/libs/ratio/doc/html/index.html (original)
+++ sandbox/chrono/libs/ratio/doc/html/index.html 2010-10-12 16:02:39 EDT (Tue, 12 Oct 2010)
@@ -1,10 +1,10 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Boost.Ratio 0.2.1</title>
+<title>Boost.Ratio 1.0.0</title>
 <link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
-<link rel="start" href="index.html" title="Boost.Ratio 0.2.1">
+<link rel="start" href="index.html" title="Boost.Ratio 1.0.0">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -21,7 +21,7 @@
 <div class="titlepage">
 <div>
 <div><h2 class="title">
-<a name="boost_ratio"></a>Boost.Ratio 0.2.1</h2></div>
+<a name="boost_ratio"></a>Boost.Ratio 1.0.0</h2></div>
 <div><div class="authorgroup">
 <div class="author"><h3 class="author">
 <span class="firstname">Howard</span> <span class="surname">Hinnant</span>
@@ -37,7 +37,7 @@
 <div><p class="copyright">Copyright &#169; 2006 , 2008 Beman Dawes</p></div>
 <div><p class="copyright">Copyright &#169; 2009 -2010 Vicente J. Botet Escriba</p></div>
 <div><div class="legalnotice">
-<a name="id4986967"></a><p>
+<a name="id4946076"></a><p>
         Distributed under the Boost Software License, Version 1.0. (See accompanying
         file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
       </p>
@@ -53,15 +53,16 @@
 <dt><span class="section">Motivation</span></dt>
 <dt><span class="section">Description</span></dt>
 </dl></dd>
-<dt><span class="section"> Users'Guide</span></dt>
+<dt><span class="section"> User's Guide</span></dt>
 <dd><dl>
 <dt><span class="section"> Getting Started</span></dt>
 <dt><span class="section">Tutorial</span></dt>
-<dt><span class="section">Examples</span></dt>
+<dt><span class="section"> Example</span></dt>
 <dt><span class="section"> External Resources</span></dt>
 </dl></dd>
 <dt><span class="section"> Reference </span></dt>
 <dd><dl>
+<dt><span class="section"> Header <boost/ratio_fwd.hpp></span></dt>
 <dt><span class="section"> Header <boost/ratio.hpp></span></dt>
 <dt><span class="section"> Header <boost/ratio_io.hpp></span></dt>
 </dl></dd>
@@ -74,9 +75,7 @@
 <dt><span class="section"> Appendix D: FAQ</span></dt>
 <dt><span class="section"><a href="index.html#boost_ratio.appendices.acknowledgements"> Appendix E:
       Acknowledgements</a></span></dt>
-<dt><span class="section"> Appendix F: Tests</span></dt>
-<dt><span class="section"> Appendix G: Tickets</span></dt>
-<dt><span class="section"> Appendix H: Future plans</span></dt>
+<dt><span class="section"> Appendix F: Future Plans</span></dt>
 </dl></dd>
 </dl>
 </div>
@@ -98,7 +97,7 @@
 <dt><span class="section">Description</span></dt>
 </dl></div>
 <a name="boost_ratio.overview.how_to_use_this_documentation"></a><h3>
-<a name="id4948577"></a>
+<a name="id4948627"></a>
       <a href="index.html#boost_ratio.overview.how_to_use_this_documentation">How to Use
       This Documentation</a>
     </h3>
@@ -178,24 +177,23 @@
             with overflow and division by zero protection
           </li>
 <li>
- It provides a textual representation of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span> <span class="identifier">D</span><span class="special">&gt;</span></code> in the form of a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>.
- Other types such as <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">duration</span></code>
- can use these strings to aid in their I/O.
+ It provides a textual representation of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span> <span class="identifier">D</span><span class="special">&gt;</span></code> in the form of a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>
+ which can be useful for I/O.
           </li>
 </ul></div>
 </div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_ratio.users_guide"></a> Users'Guide
+<a name="boost_ratio.users_guide"></a> User's Guide
 </h2></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section"> Getting Started</span></dt>
 <dd><dl><dt><span class="section"><a href="index.html#boost_ratio.users_guide.getting_started.install"> Installing
         Ratio</a></span></dt></dl></dd>
 <dt><span class="section">Tutorial</span></dt>
-<dt><span class="section">Examples</span></dt>
-<dd><dl><dt><span class="section">SI-units</span></dt></dl></dd>
+<dt><span class="section"> Example</span></dt>
+<dd><dl><dt><span class="section">SI units</span></dt></dl></dd>
 <dt><span class="section"> External Resources</span></dt>
 </dl></div>
 <div class="section" lang="en">
@@ -211,7 +209,7 @@
         Ratio</a>
 </h4></div></div></div>
 <a name="boost_ratio.users_guide.getting_started.install.getting_boost_ratio_"></a><h5>
-<a name="id4949064"></a>
+<a name="id4987247"></a>
           <a href="index.html#boost_ratio.users_guide.getting_started.install.getting_boost_ratio_">Getting
           Boost.Ratio </a>
         </h5>
@@ -226,7 +224,7 @@
           and follow the instructions there for anonymous SVN access.
         </p>
 <a name="boost_ratio.users_guide.getting_started.install.where_to_install_boost_ratio__"></a><h5>
-<a name="id4949134"></a>
+<a name="id4987317"></a>
           <a href="index.html#boost_ratio.users_guide.getting_started.install.where_to_install_boost_ratio__">Where
           to install Boost.Ratio? </a>
         </h5>
@@ -242,7 +240,7 @@
           variable. Any help is welcome.
         </p>
 <a name="boost_ratio.users_guide.getting_started.install.building_boost_ratio_"></a><h5>
-<a name="id4949171"></a>
+<a name="id4987354"></a>
           <a href="index.html#boost_ratio.users_guide.getting_started.install.building_boost_ratio_">Building
           Boost.Ratio </a>
         </h5>
@@ -251,7 +249,7 @@
           so no need to compile anything.
         </p>
 <a name="boost_ratio.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4949202"></a>
+<a name="id4987385"></a>
           <a href="index.html#boost_ratio.users_guide.getting_started.install.requirements">Requirements</a>
         </h5>
 <p>
@@ -292,24 +290,24 @@
 </dl>
 </div>
 <a name="boost_ratio.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_ratio__emphasis__"></a><h5>
-<a name="id4949380"></a>
+<a name="id4987563"></a>
           <a href="index.html#boost_ratio.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_ratio__emphasis__">Building
           an executable that uses <span class="bold"><strong>Boost.Ratio</strong></span> </a>
         </h5>
 <p>
           No link is needed.
         </p>
-<a name="boost_ratio.users_guide.getting_started.install.exceptions_safety_"></a><h5>
-<a name="id4949413"></a>
- <a href="index.html#boost_ratio.users_guide.getting_started.install.exceptions_safety_">Exceptions
+<a name="boost_ratio.users_guide.getting_started.install.exception_safety_"></a><h5>
+<a name="id4987596"></a>
+ <a href="index.html#boost_ratio.users_guide.getting_started.install.exception_safety_">Exception
           safety </a>
         </h5>
 <p>
- All functions in the library are exception-neutral and provide strong guarantee
- of exception safety as long as the underlying parameters provide it.
+ All functions in the library are exception-neutral, providing the strong
+ exception safety guarantee.
         </p>
 <a name="boost_ratio.users_guide.getting_started.install.thread_safety_"></a><h5>
-<a name="id4949441"></a>
+<a name="id4987620"></a>
           <a href="index.html#boost_ratio.users_guide.getting_started.install.thread_safety_">Thread
           safety </a>
         </h5>
@@ -317,13 +315,13 @@
           All functions in the library are thread-unsafe except when noted explicitly.
         </p>
 <a name="boost_ratio.users_guide.getting_started.install.tested_compilers_"></a><h5>
-<a name="id4949466"></a>
+<a name="id4987646"></a>
           <a href="index.html#boost_ratio.users_guide.getting_started.install.tested_compilers_">Tested
           compilers </a>
         </h5>
 <p>
- The implementation will eventually work with most C++03 conforming compilers.
- Current version has been tested on:
+ <span class="bold"><strong>Boost.Ratio</strong></span> should work with an C++03
+ conforming compiler. The current version has been tested on:
         </p>
 <p>
           Windows with
@@ -401,20 +399,24 @@
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_ratio.users_guide.tutorial"></a>Tutorial
 </h3></div></div></div>
+<a name="boost_ratio.users_guide.tutorial.ratio"></a><h4>
+<a name="id4987811"></a>
+ Ratio
+ </h4>
 <p>
         <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>
         is a general purpose utility inspired by Walter Brown allowing one to easily
         and safely compute rational values at compile time. The <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> class catches all errors (such
- as divide by zero and overflow) at compile time. It is used in the <code class="computeroutput"><span class="identifier">duration</span></code> and <code class="computeroutput"><span class="identifier">time_point</span></code>
- classes to efficiently create units of time. It can also be used in other
- "quantity" libraries (both std-defined and user-defined), or anywhere
- there is a rational constant which is known at compile time. The use of this
- utility can greatly reduce the chances of run time overflow because the
- <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>
- (and any ratios resulting from <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ as divide by zero and overflow) at compile time. It is used in the duration
+ and __time<span class="underline">point</span>_ classes to efficiently
+ create units of time. It can also be used in other "quantity" libraries
+ or anywhere there is a rational constant which is known at compile time.
+ The use of this utility can greatly reduce the chances of run time overflow
+ because the <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> (and any ratios resulting
+ from <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> arithmetic) are always reduced
         to lowest terms.
       </p>
@@ -422,7 +424,7 @@
         <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>
         is a template taking two intmax_ts, with the second defaulted to 1. In addition
- to copy constructors and assignement, it only has two public members, both
+ to copy constructors and assignment, it only has two public members, both
         of which are static const intmax_t. One is the numerator of the <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> and the other is the denominator.
         The <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
@@ -451,7 +453,8 @@
         recognized definitions (in terms of <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>). This is a tremendous syntactic
         convenience. It will prevent errors in specifying constants as one no longer
- has to double count the number of zeros when trying to write million or billion.
+ has to double count the number of zeros when trying to write millions or
+ billions.
       </p>
 <p>
         <span class="bold"><strong>Example:</strong></span>
@@ -464,28 +467,122 @@
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">5</span><span class="special">&gt;,</span> <span class="identifier">nano</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">_5nano</span><span class="special">;</span>
 <span class="comment">// _5nano::num == 1, _5nano::den == 200000000
 </span></pre>
+<a name="boost_ratio.users_guide.tutorial.ratio_i_o"></a><h4>
+<a name="id4942502"></a>
+ Ratio I/O
+ </h4>
+<p>
+ For each <code class="computeroutput"><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span> <span class="identifier">D</span><span class="special">&gt;</span></code> there exists a <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span>
+ <span class="identifier">D</span><span class="special">&gt;,</span>
+ <span class="identifier">CharT</span><span class="special">&gt;</span></code>
+ for which you can query two strings: <code class="computeroutput"><span class="identifier">short_name</span></code>
+ and <code class="computeroutput"><span class="identifier">long_name</span></code>. For those
+ <code class="computeroutput"><span class="identifier">ratio</span></code>'s that correspond to
+ an <a href="http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes" target="_top">SI
+ prefix</a> long_name corresponds to the internationally recognized prefix,
+ stored as a <code class="computeroutput"><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span></code>. For example <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">mega</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span></code>
+ returns <code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="string">"mega"</span><span class="special">)</span></code>.
+ For those <code class="computeroutput"><span class="identifier">ratio</span></code>'s that correspond
+ to an <a href="http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes" target="_top">SI
+ prefix</a> <code class="computeroutput"><span class="identifier">short_name</span></code>
+ corresponds to the internationally recognized symbol, stored as a <code class="computeroutput"><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span></code>.
+ For example <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">mega</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span></code>
+ returns <code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="string">"M"</span><span class="special">)</span></code>.
+ For all other <code class="computeroutput"><span class="identifier">ratio</span></code>'s, both
+ <code class="computeroutput"><span class="identifier">long_name</span><span class="special">()</span></code>
+ and <code class="computeroutput"><span class="identifier">short_name</span><span class="special">()</span></code>
+ return a <code class="computeroutput"><span class="identifier">basic_string</span></code> containing
+ "[<code class="computeroutput"><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">num</span><span class="special">/</span><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">den</span></code>]".
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span> <span class="identifier">D</span><span class="special">&gt;,</span> <span class="identifier">CharT</span><span class="special">&gt;</span></code> is only defined for four character types:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ <code class="computeroutput"><span class="keyword">char</span></code>: UTF-8
+ </li>
+<li>
+ <code class="computeroutput"><span class="identifier">char16_t</span></code>: UTF-16
+ </li>
+<li>
+ <code class="computeroutput"><span class="identifier">char32_t</span></code>: UTF-32
+ </li>
+<li>
+ <code class="computeroutput"><span class="keyword">wchar_t</span></code>: UTF-16 (if wchar_t
+ is 16 bits) or UTF-32
+ </li>
+</ul></div>
+<p>
+ When the character is char, UTF-8 will be used to encode the names. When
+ the character is <code class="computeroutput"><span class="identifier">char16_t</span></code>,
+ UTF-16 will be used to encode the names. When the character is <code class="computeroutput"><span class="identifier">char32_t</span></code>, UTF-32 will be used to encode
+ the names. When the character is <code class="computeroutput"><span class="keyword">wchar_t</span></code>,
+ the encoding will be UTF-16 if <code class="computeroutput"><span class="keyword">wchar_t</span></code>
+ is 16 bits, and otherwise UTF-32.
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">short_name</span></code> for micro
+ is defined by Unicode
+ to be U+00B5.
+ </p>
+<p>
+ <span class="bold"><strong>Examples:</strong></span>
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">ratio</span><span class="special">/</span><span class="identifier">ratio_io</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</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">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
+
+ <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;deca, char&gt;::long_name() = "</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;deca, char&gt;::short_name() = "</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+
+ <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;giga, char&gt;::long_name() = "</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;giga, char&gt;::short_name() = "</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+
+ <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;ratio&lt;4, 6&gt;, char&gt;::long_name() = "</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;ratio&lt;4, 6&gt;, char&gt;::short_name() = "</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ The output will be
+ </p>
+<pre class="programlisting"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">deca</span>
+<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">da</span>
+<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">giga</span>
+<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">G</span>
+<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">=</span> <span class="special">[</span><span class="number">2</span><span class="special">/</span><span class="number">3</span><span class="special">]</span>
+<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">=</span> <span class="special">[</span><span class="number">2</span><span class="special">/</span><span class="number">3</span><span class="special">]</span>
+</pre>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_ratio.users_guide.examples"></a>Examples
+<a name="boost_ratio.users_guide.Examples"></a> Example
 </h3></div></div></div>
-<div class="toc"><dl><dt><span class="section">SI-units</span></dt></dl></div>
+<div class="toc"><dl><dt><span class="section">SI units</span></dt></dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost_ratio.users_guide.examples.si_units"></a>SI-units
+<a name="boost_ratio.users_guide.Examples.si_units"></a>SI units
 </h4></div></div></div>
 <p>
- Type-safe "physics" code interoperating with boost::chrono::
- <code class="computeroutput"><span class="identifier">duration</span></code> types and taking
- advantage of the boost::<a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> infrastructure and design
+ This example illustrates the use of type-safe physics code interoperating
+ with <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code> types, taking advantage of the
+ <span class="bold"><strong>Boost.Ratio</strong></span> infrastructure and design
           philosophy.
         </p>
 <p>
- length - mimics boost::chrono:: <code class="computeroutput"><span class="identifier">duration</span></code>
- except restricts representation to double. Uses boost::<a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> facilities for length units
- conversions.
+ Let's start by defining a <code class="computeroutput"><span class="identifier">length</span></code>
+ class template that mimics <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code>,
+ which represents a time duration in various units, but restricts the representation
+ to <code class="computeroutput"><span class="keyword">double</span></code> and uses <span class="bold"><strong>Boost.Ratio</strong></span> for length unit conversions:
         </p>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Ratio</span><span class="special">&gt;</span>
 <span class="keyword">class</span> <span class="identifier">length</span> <span class="special">{</span>
@@ -514,21 +611,21 @@
 <span class="special">};</span>
 </pre>
 <p>
- Sparse sampling of length units
+ Here's a small sampling of length units:
         </p>
 <pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">meter</span><span class="special">;</span> <span class="comment">// set meter as "unity"
-</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">centi</span></code></a><span class="special">&gt;</span> <span class="identifier">centimeter</span><span class="special">;</span> <span class="comment">// 1/100 meter
-</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">kilo</span></code></a><span class="special">&gt;</span> <span class="identifier">kilometer</span><span class="special">;</span> <span class="comment">// 1000 meters
 </span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">254</span><span class="special">,</span> <span class="number">10000</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">inch</span><span class="special">;</span> <span class="comment">// 254/10000 meters
 </span></pre>
 <p>
- length takes <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> instead of two integral
- types so that definitions can be made like so:
+ Note that since <code class="computeroutput"><span class="identifier">length</span></code>'s
+ template parameter is actually a generic ratio type, so we can use boost::ratio
+ allowing for more complex length units:
         </p>
 <pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_multiply</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">12</span><span class="special">&gt;,</span> <span class="identifier">inch</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
@@ -538,23 +635,23 @@
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span> <span class="identifier">mile</span><span class="special">;</span> <span class="comment">// 5280 feet
 </span></pre>
 <p>
- Need a floating point definition of seconds
+ Now we need a floating point-based definition of seconds:
         </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">duration</span></code><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">seconds</span><span class="special">;</span> <span class="comment">// unity
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">seconds</span><span class="special">;</span> <span class="comment">// unity
 </span></pre>
 <p>
- Demo of (scientific) support for sub-nanosecond resolutions
+ We can even support sub-nanosecond durations:
         </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">duration</span></code><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">pico</span></code></a><span class="special">&gt;</span> <span class="identifier">picosecond</span><span class="special">;</span> <span class="comment">// 10^-12 seconds
-</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">duration</span></code><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">femto</span></code></a><span class="special">&gt;</span> <span class="identifier">femtosecond</span><span class="special">;</span> <span class="comment">// 10^-15 seconds
-</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">duration</span></code><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">atto</span></code></a><span class="special">&gt;</span> <span class="identifier">attosecond</span><span class="special">;</span> <span class="comment">// 10^-18 seconds
 </span></pre>
 <p>
- A very brief proof-of-concept for SIUnits-like library. Hard-wired to floating
- point seconds and meters, but accepts other units.
+ Finally, we can write a proof-of-concept of an SI units library, hard-wired
+ for meters and floating point seconds, though it will accept other units:
         </p>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span>
 <span class="keyword">class</span> <span class="identifier">quantity</span>
@@ -612,7 +709,7 @@
 <span class="special">};</span>
 </pre>
 <p>
- Example of SI-Units
+ That allows us to create some useful SI-based unit types:
         </p>
 <pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">0</span><span class="special">&gt;,</span> <span class="identifier">boost</span><span class="special">::</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
@@ -631,7 +728,7 @@
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">Acceleration</span><span class="special">;</span> <span class="comment">// meter/second^2
 </span></pre>
 <p>
- Quantity arithmetics
+ To make quantity useful, we need to be able to do arithmetic:
         </p>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R3</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R4</span><span class="special">&gt;</span>
 <span class="identifier">quantity</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special">&lt;</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
@@ -678,7 +775,8 @@
 <span class="special">}</span>
 </pre>
 <p>
- Example type-safe physics function
+ With all of the foregoing scaffolding, we can now write an exemplar of
+ a type-safe physics function:
         </p>
 <pre class="programlisting"><span class="identifier">Distance</span>
 <span class="identifier">compute_distance</span><span class="special">(</span><span class="identifier">Speed</span> <span class="identifier">v0</span><span class="special">,</span> <span class="identifier">Time</span> <span class="identifier">t</span><span class="special">,</span> <span class="identifier">Acceleration</span> <span class="identifier">a</span><span class="special">)</span>
@@ -687,10 +785,11 @@
 </span><span class="special">}</span>
 </pre>
 <p>
- Exercise example type-safe physics function and show interoperation of
- custom time durations (User1::seconds) and standard time durations (boost::hours).
- Though input can be arbitrary (but type-safe) units, output is always in
- SI-units (a limitation of the simplified Units lib demoed here).
+ Finally, we can exercise what we've created, even using custom time durations
+ (<code class="computeroutput"><span class="identifier">User1</span><span class="special">::</span><span class="identifier">seconds</span></code>) as well as Boost time durations
+ (<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">hours</span></code>). The input can be in arbitrary,
+ though type-safe, units, the output is always in SI units. (A complete
+ Units library would support other units, of course.)
         </p>
 <pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>
@@ -712,7 +811,7 @@
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"* testUser1 *\n"</span><span class="special">;</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"*************\n"</span><span class="special">;</span>
     <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Distance</span> <span class="identifier">d</span><span class="special">(</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">(</span><span class="number">110</span><span class="special">)</span> <span class="special">);</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span> <span class="identifier">t</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">hours</span></code><span class="special">(</span><span class="number">2</span><span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span> <span class="identifier">t</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">__hours__</span><span class="special">(</span><span class="number">2</span><span class="special">)</span> <span class="special">);</span>
 
     <span class="identifier">RR</span> <span class="identifier">r</span><span class="special">=</span><span class="identifier">d</span> <span class="special">/</span> <span class="identifier">t</span><span class="special">;</span>
     <span class="comment">//r.set(d.get() / t.get());
@@ -744,11 +843,11 @@
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"1 second is "</span> <span class="special">&lt;&lt;</span> <span class="identifier">as</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" attoseconds\n"</span><span class="special">;</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"as = sec; // compiles\n"</span><span class="special">;</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
- <span class="emphasis"><em>See the source file test/ratio_test.cpp</em></span>
+ <span class="emphasis"><em>See the source file example/si_physics.cpp</em></span>
         </p>
 </div>
 </div>
@@ -763,9 +862,8 @@
           Standards Committee's current Working Paper</strong></span></a></span></dt>
 <dd><p>
               The most authoritative reference material for the library is the C++
- Standards Committee's current Working Paper (WP). 20.9 Time utilities
- "time", 20.4 Compile-time rational arithmetic "ratio",
- 20.6.7 Other transformations "meta.trans.other"
+ Standards Committee's current Working Paper (WP). 20.6 Compile-time
+ rational arithmetic "ratio"
             </p></dd>
 <dt><span class="term">N2661 - A Foundation to Sleep On</span></dt>
 <dd><p>
@@ -777,10 +875,6 @@
 <dd><p>
               From Vicente Juan Botet Escriba.
             </p></dd>
-<dt><span class="term">N3131: Compile-time rational arithmetic and overflow</span></dt>
-<dd><p>
- From Anthony Williams.
- </p></dd>
 </dl>
 </div>
 </div>
@@ -790,16 +884,17 @@
 <a name="boost_ratio.reference"></a> Reference
 </h2></div></div></div>
 <div class="toc"><dl>
+<dt><span class="section"> Header <boost/ratio_fwd.hpp></span></dt>
 <dt><span class="section"> Header <boost/ratio.hpp></span></dt>
 <dd><dl>
 <dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.conf"> Configuration
- macros</a></span></dt>
+ Macros</a></span></dt>
 <dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio"> Class Template
         <code class="computeroutput"><span class="identifier">ratio</span><span class="special">&lt;&gt;</span></code></a></span></dt>
 <dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic">
- <code class="computeroutput"><span class="identifier">ratio</span></code> arithmetic</a></span></dt>
+ <code class="computeroutput"><span class="identifier">ratio</span></code> Arithmetic</a></span></dt>
 <dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison">
- <code class="computeroutput"><span class="identifier">ratio</span></code> comparison</a></span></dt>
+ <code class="computeroutput"><span class="identifier">ratio</span></code> Comparison</a></span></dt>
 <dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs">
         SI typedefs</a></span></dt>
 <dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.limitations"> Limitations
@@ -809,111 +904,120 @@
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_ratio.reference.ratio_hpp"></a> Header <boost/ratio.hpp>
+<a name="boost_ratio.reference.ratio_fwdhpp"></a> Header <boost/ratio_fwd.hpp>
 </h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.conf"> Configuration
- macros</a></span></dt>
-<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio"> Class Template
- <code class="computeroutput"><span class="identifier">ratio</span><span class="special">&lt;&gt;</span></code></a></span></dt>
-<dd><dl><dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio.ca"> Construction
- and assignment</a></span></dt></dl></dd>
-<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic">
- <code class="computeroutput"><span class="identifier">ratio</span></code> arithmetic</a></span></dt>
-<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison">
- <code class="computeroutput"><span class="identifier">ratio</span></code> comparison</a></span></dt>
-<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs">
- SI typedefs</a></span></dt>
-<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.limitations"> Limitations
- and Extensions</a></span></dt>
-</dl></div>
 <p>
- <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>
- is a facility which is useful in specifying compile time rational constants.
- Compile time rational arithmetic is supported with protection against overflow
- and divide by zero. Such a facility is very handy when needing to efficiently
- represent 1/3 of a nanosecond, or specifying an inch in terms of meters (for
- example 254/10000 meters - which <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> will reduce to 127/5000 meters).
+ This header provides forward declarations for the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">ratio</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ file.
       </p>
-<pre class="programlisting"><span class="comment">// configuration macros
-</span><span class="preprocessor">#define</span> <a href="index.html#boost_ratio.reference.ratio_hpp.conf" title=" Configuration
- macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_STATIC_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="index.html#boost_ratio.reference.ratio_hpp.conf" title=" Configuration
- macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_MPL_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="index.html#boost_ratio.reference.ratio_hpp.conf" title=" Configuration
- macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_ARRAY_ASSERT</span></code></a>
-
-<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
 
     <span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">N</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">D</span> <span class="special">=</span> <span class="number">1</span><span class="special">&gt;</span> <span class="keyword">class</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">;</span>
 
     <span class="comment">// ratio arithmetic
-</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_add</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_subtract</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_multiply</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_divide</span></code></a><span class="special">;</span>
+</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
+ ratio Arithmetic"><code class="computeroutput"><span class="identifier">ratio_add</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
+ ratio Arithmetic"><code class="computeroutput"><span class="identifier">ratio_subtract</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
+ ratio Arithmetic"><code class="computeroutput"><span class="identifier">ratio_multiply</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
+ ratio Arithmetic"><code class="computeroutput"><span class="identifier">ratio_divide</span></code></a><span class="special">;</span>
 
     <span class="comment">// ratio comparison
-</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_equal</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_not_equal</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_less</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_less_equal</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_greater</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_greater_equal</span></code></a><span class="special">;</span>
+</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
+ ratio Comparison"><code class="computeroutput"><span class="identifier">ratio_equal</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
+ ratio Comparison"><code class="computeroutput"><span class="identifier">ratio_not_equal</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
+ ratio Comparison"><code class="computeroutput"><span class="identifier">ratio_less</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
+ ratio Comparison"><code class="computeroutput"><span class="identifier">ratio_less_equal</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
+ ratio Comparison"><code class="computeroutput"><span class="identifier">ratio_greater</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
+ ratio Comparison"><code class="computeroutput"><span class="identifier">ratio_greater_equal</span></code></a><span class="special">;</span>
 
     <span class="comment">// convenience SI typedefs
-</span> <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+</span> <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">atto</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">femto</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">pico</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">nano</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">micro</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">milli</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">100LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">100LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">centi</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">10LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">10LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">deci</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">10LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">10LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">deca</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">100LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">100LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">hecto</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">kilo</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">mega</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">giga</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">tera</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span> <span class="number">1000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">peta</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1000000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
+ <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">1000000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">&gt;</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs" title="
         SI typedefs"><code class="computeroutput"><span class="identifier">exa</span></code></a><span class="special">;</span>
 <span class="special">}</span>
 </pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_ratio.reference.ratio_hpp"></a> Header <boost/ratio.hpp>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.conf"> Configuration
+ Macros</a></span></dt>
+<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio"> Class Template
+ <code class="computeroutput"><span class="identifier">ratio</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio.ca"> Construction
+ and Assignment</a></span></dt></dl></dd>
+<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic">
+ <code class="computeroutput"><span class="identifier">ratio</span></code> Arithmetic</a></span></dt>
+<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison">
+ <code class="computeroutput"><span class="identifier">ratio</span></code> Comparison</a></span></dt>
+<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_si_typedefs">
+ SI typedefs</a></span></dt>
+<dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.limitations"> Limitations
+ and Extensions</a></span></dt>
+</dl></div>
+<p>
+ <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>
+ is a facility which is useful in specifying compile time rational constants.
+ Compile time rational arithmetic is supported with protection against overflow
+ and divide by zero. Such a facility is very handy when needing to efficiently
+ represent 1/3 of a nanosecond, or specifying an inch in terms of meters (for
+ example 254/10000 meters - which <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> will reduce to 127/5000 meters).
+ </p>
+<pre class="programlisting"><span class="comment">// configuration macros
+</span><span class="preprocessor">#define</span> <a href="index.html#boost_ratio.reference.ratio_hpp.conf" title=" Configuration
+ Macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_STATIC_ASSERT</span></code></a>
+<span class="preprocessor">#define</span> <a href="index.html#boost_ratio.reference.ratio_hpp.conf" title=" Configuration
+ Macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_MPL_ASSERT</span></code></a>
+<span class="preprocessor">#define</span> <a href="index.html#boost_ratio.reference.ratio_hpp.conf" title=" Configuration
+ Macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_ARRAY_ASSERT</span></code></a>
+</pre>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
 <a name="boost_ratio.reference.ratio_hpp.conf"></a><a href="index.html#boost_ratio.reference.ratio_hpp.conf" title=" Configuration
- macros"> Configuration
- macros</a>
+ Macros"> Configuration
+ Macros</a>
 </h4></div></div></div>
 <p>
           When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static
@@ -921,35 +1025,34 @@
         </p>
 <div class="itemizedlist"><ul type="disc">
 <li>
- BOOST_RATIO_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
+ BOOST_RATIO_USES_STATIC_ASSERT to use Boost.StaticAssert
             </li>
 <li>
- BOOST_RATIO_USES_MPL_ASSERT: define it if you want to use Boost.MPL
- static asertions
+ BOOST_RATIO_USES_MPL_ASSERT to use Boost.MPL static assertions
             </li>
 <li>
- BOOST_RATIO_USES_ARRAY_ASSERT: define it if you want to use internal
- static asertions
+ BOOST_RATIO_USES_RATIO_ASSERT to use <span class="bold"><strong>Boost.Ratio</strong></span>
+ static assertions
             </li>
 </ul></div>
 <p>
- The default behavior is as BOOST_RATIO_USES_ARRAY_ASSERT was defined.
+ The default behavior is as if BOOST_RATIO_USES_ARRAY_ASSERT is defined.
         </p>
 <p>
           When BOOST_RATIO_USES_MPL_ASSERT is not defined the following symbols are
- defined as
+ defined as shown:
         </p>
 <pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_ADD</span> <span class="string">"overflow in ratio add"</span>
 <span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_SUB</span> <span class="string">"overflow in ratio sub"</span>
 <span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_MUL</span> <span class="string">"overflow in ratio mul"</span>
 <span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_DIV</span> <span class="string">"overflow in ratio div"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_RATIO_NUMERATOR_IS_OUT_OF_RANGE</span> <span class="string">"ratio numerator is out of range"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_RATIO_DIVIDE_BY_0</span> <span class="string">"ratio divide by 0"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_RATIO_DENOMINATOR_IS_OUT_OF_RANGE</span> <span class="string">"ratio denominator is out of range"</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE</span> <span class="string">"ratio numerator is out of range"</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_DIVIDE_BY_0</span> <span class="string">"ratio divide by 0"</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE</span> <span class="string">"ratio denominator is out of range"</span>
 </pre>
 <p>
- Depending on the static assertion used system you will have an hint of
- the failing assertion either through the symbol or through the texte.
+ Depending upon the static assertion system used, a hint as to the failing
+ assertion will appear in some form in the compiler diagnostic output.
         </p>
 </div>
 <div class="section" lang="en">
@@ -959,7 +1062,7 @@
         <code class="computeroutput"><span class="identifier">ratio</span><span class="special">&lt;&gt;</span></code></a>
 </h4></div></div></div>
 <div class="toc"><dl><dt><span class="section"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio.ca"> Construction
- and assignment</a></span></dt></dl></div>
+ and Assignment</a></span></dt></dl></div>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">N</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">D</span><span class="special">&gt;</span>
 <span class="keyword">class</span> <span class="identifier">ratio</span> <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
@@ -985,10 +1088,11 @@
           In a two's complement representation, this excludes the most negative value.
         </p>
 <p>
- Let <code class="computeroutput"><span class="identifier">gcd</span></code> denote the greatest
- common divisor of <code class="computeroutput"><span class="identifier">N</span></code>'s absolute
- value and of <code class="computeroutput"><span class="identifier">D</span></code>'s absolute
- value.
+ The members num and den will be normalized values of the template arguments
+ N and D computed as follows. Let <code class="computeroutput"><span class="identifier">gcd</span></code>
+ denote the greatest common divisor of <code class="computeroutput"><span class="identifier">N</span></code>'s
+ absolute value and of <code class="computeroutput"><span class="identifier">D</span></code>'s
+ absolute value. Then:
         </p>
 <div class="itemizedlist"><ul type="disc">
 <li>
@@ -1004,7 +1108,8 @@
           The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
           denotes the normalized form of this <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> type. It should be used
- when the template parameters doesn't give a normalized form.
+ when the normalized form of the template arguments are required, since
+ the arguments are not necessarily normalized.
         </p>
 <p>
           Two <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
@@ -1017,8 +1122,8 @@
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h5 class="title">
 <a name="boost_ratio.reference.ratio_hpp.ratio.ca"></a><a href="index.html#boost_ratio.reference.ratio_hpp.ratio.ca" title=" Construction
- and assignment"> Construction
- and assignment</a>
+ and Assignment"> Construction
+ and Assignment</a>
 </h5></div></div></div>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">intmax_t</span> <span class="identifier">N2</span><span class="special">,</span> <span class="identifier">intmax_t</span> <span class="identifier">D2</span><span class="special">&gt;</span>
   <span class="identifier">ratio</span><span class="special">(</span><span class="keyword">const</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
@@ -1055,16 +1160,20 @@
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
 <a name="boost_ratio.reference.ratio_hpp.ratio_arithmetic"></a><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic">
- <code class="computeroutput"><span class="identifier">ratio</span></code> arithmetic</a>
+ ratio Arithmetic">
+ <code class="computeroutput"><span class="identifier">ratio</span></code> Arithmetic</a>
 </h4></div></div></div>
 <p>
- For each of the class templates in this clause, each template parameter
+ For each of the class templates in this section, each template parameter
           refers to a <code class="computeroutput"><span class="identifier">ratio</span></code>. If the
           implementation is unable to form the indicated <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a> due to overflow, a diagnostic
           will be issued.
         </p>
+<a name="boost_ratio.reference.ratio_hpp.ratio_arithmetic._code__phrase_role__identifier__ratio_add__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5007880"></a>
+ ratio_add<>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_add</span> <span class="special">{</span>
    <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
 <span class="special">};</span>
@@ -1074,6 +1183,10 @@
           is a synonym for <code class="computeroutput"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="identifier">R1</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span> <span class="special">+</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
         </p>
+<a name="boost_ratio.reference.ratio_hpp.ratio_arithmetic._code__phrase_role__identifier__ratio_subtract__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5008186"></a>
+ ratio_subtract<>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_subtract</span> <span class="special">{</span>
    <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
 <span class="special">};</span>
@@ -1083,6 +1196,10 @@
           is a synonym for <code class="computeroutput"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="identifier">R1</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span> <span class="special">-</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
         </p>
+<a name="boost_ratio.reference.ratio_hpp.ratio_arithmetic._code__phrase_role__identifier__ratio_multiply__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5008492"></a>
+ ratio_multiply<>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_multiply</span> <span class="special">{</span>
    <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
 <span class="special">};</span>
@@ -1092,6 +1209,10 @@
           is a synonym for <code class="computeroutput"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="identifier">R1</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">num</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
         </p>
+<a name="boost_ratio.reference.ratio_hpp.ratio_arithmetic._code__phrase_role__identifier__ratio_divide__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5008759"></a>
+ ratio_divide<>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_divide</span> <span class="special">{</span>
    <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
 <span class="special">};</span>
@@ -1105,9 +1226,13 @@
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
 <a name="boost_ratio.reference.ratio_hpp.ratio_comparison"></a><a href="index.html#boost_ratio.reference.ratio_hpp.ratio_comparison" title="
- ratio comparison">
- <code class="computeroutput"><span class="identifier">ratio</span></code> comparison</a>
+ ratio Comparison">
+ <code class="computeroutput"><span class="identifier">ratio</span></code> Comparison</a>
 </h4></div></div></div>
+<a name="boost_ratio.reference.ratio_hpp.ratio_comparison._code__phrase_role__identifier__ratio_equal__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5009054"></a>
+ ratio_equal<>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_equal</span>
     <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="special">&gt;</span> <span class="special">{};</span>
 </pre>
@@ -1115,6 +1240,17 @@
           If R1::num <code class="literal">= R2::num &amp;&amp; R1::den =</code> R2::den, ratio_equal
           derives from true_type, else derives from false_type.
         </p>
+<a name="boost_ratio.reference.ratio_hpp.ratio_comparison._code__phrase_role__identifier__ratio_not_equal__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5009237"></a>
+ ratio_not_equal<>
+ </h5>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_not_equal</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">!</span><span class="identifier">ratio_equal</span><span class="special">&lt;</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{};</span>
+</pre>
+<a name="boost_ratio.reference.ratio_hpp.ratio_comparison._code__phrase_role__identifier__ratio_less__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5009426"></a>
+ ratio_less<>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span>
 <span class="keyword">struct</span> <span class="identifier">ratio_less</span>
     <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="special">&gt;</span> <span class="special">{};</span>
@@ -1123,16 +1259,25 @@
           If R1::num * R2::den &lt; R2::num * R1::den, ratio_less derives from true_type,
           else derives from false_type.
         </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_not_equal</span>
- <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">!</span><span class="identifier">ratio_equal</span><span class="special">&lt;</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{};</span>
-
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_less_equal</span>
+<a name="boost_ratio.reference.ratio_hpp.ratio_comparison._code__phrase_role__identifier__ratio_less_equal__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5009605"></a>
+ ratio_less_equal<>
+ </h5>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_less_equal</span>
     <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">!</span><span class="identifier">ratio_less</span><span class="special">&lt;</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{};</span>
-
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_greater</span>
+</pre>
+<a name="boost_ratio.reference.ratio_hpp.ratio_comparison._code__phrase_role__identifier__ratio_greater__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5009794"></a>
+ ratio_greater<>
+ </h5>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_greater</span>
     <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span> <span class="identifier">ratio_less</span><span class="special">&lt;</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{};</span>
-
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_greater_equal</span>
+</pre>
+<a name="boost_ratio.reference.ratio_hpp.ratio_comparison._code__phrase_role__identifier__ratio_greater_equal__phrase__phrase_role__special___lt__gt___phrase___code_"></a><h5>
+<a name="id5009980"></a>
+ ratio_greater_equal<>
+ </h5>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ratio_greater_equal</span>
     <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">!</span><span class="identifier">ratio_less</span><span class="special">&lt;</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{};</span>
 </pre>
 </div>
@@ -1142,6 +1287,13 @@
         SI typedefs">
         SI typedefs</a>
 </h4></div></div></div>
+<p>
+ The <a href="http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes" target="_top">International
+ System of Units</a> specifies twenty SI prefixes. <span class="bold"><strong>Boost.Ratio</strong></span>
+ defines all except <code class="computeroutput"><span class="identifier">yocto</span></code>,
+ <code class="computeroutput"><span class="identifier">zepto</span></code>, <code class="computeroutput"><span class="identifier">zetta</span></code>,
+ and <code class="computeroutput"><span class="identifier">yotta</span></code>
+ </p>
 <pre class="programlisting"><span class="comment">// convenience SI typedefs
 </span><span class="keyword">typedef</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000000LL</span><span class="special">&gt;</span> <span class="identifier">atto</span><span class="special">;</span>
@@ -1184,44 +1336,35 @@
         and Extensions</a>
 </h4></div></div></div>
 <p>
- Next follows limitation respect to the C++0x recomendations:
+ The following are limitations of Boost.Ratio relative to the specification
+ in the C++0x draft standard:
         </p>
-<div class="itemizedlist"><ul type="disc"><li>
- Four of the typedefs in the recomendation which can be conditionally
- supported are not supported: <code class="computeroutput"><span class="identifier">yocto</span></code>,
- <code class="computeroutput"><span class="identifier">zepto</span></code>, <code class="computeroutput"><span class="identifier">zetta</span></code> and <code class="computeroutput"><span class="identifier">yotta</span></code>.
- </li></ul></div>
-<pre class="programlisting"><span class="keyword">typedef</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">,</span> <span class="number">1000000000000000000000000</span><span class="special">&gt;</span> <span class="identifier">yocto</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span><span class="keyword">typedef</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">,</span> <span class="number">1000000000000000000000</span><span class="special">&gt;</span> <span class="identifier">zepto</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span><span class="keyword">typedef</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span> <span class="number">1000000000000000000000</span><span class="special">,</span> <span class="number">1</span><span class="special">&gt;</span> <span class="identifier">zetta</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span><span class="keyword">typedef</span> <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1000000000000000000000000</span><span class="special">,</span> <span class="number">1</span><span class="special">&gt;</span> <span class="identifier">yotta</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span></pre>
 <div class="itemizedlist"><ul type="disc">
 <li>
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3135.html#1121" target="_top">Ratio
- values should be constexpr</a>: <code class="computeroutput"><span class="identifier">constexpr</span></code>
- don't used as no compiler supports it today. <code class="computeroutput"><span class="keyword">const</span></code>
- is used instead when appropiated.
+ Four of the SI units typedefs -- <code class="computeroutput"><span class="identifier">yocto</span></code>,
+ <code class="computeroutput"><span class="identifier">zepto</span></code>, <code class="computeroutput"><span class="identifier">zetta</span></code>, and <code class="computeroutput"><span class="identifier">yotta</span></code>
+ -- are to be conditionally supported, if the range of <code class="computeroutput"><span class="identifier">intmax_t</span></code> allows, but are not supported
+ by <span class="bold"><strong>Boost.Ratio</strong></span>.
+ </li>
+<li>
+ Ratio values should be of type static <code class="computeroutput"><span class="identifier">constexpr</span>
+ <span class="identifier">intmax_t</span></code> (see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3135.html#1121" target="_top">Ratio
+ values should be constexpr</a>), but no compiler supports <code class="computeroutput"><span class="identifier">constexpr</span></code> today, so <span class="bold"><strong>Boost.Ratio</strong></span>
+ uses <code class="computeroutput"><span class="keyword">static</span> <span class="keyword">const</span>
+ <span class="identifier">intmax_t</span></code> instead.
             </li>
 <li>
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3134.html#921" target="_top">Rational
- Arithmetic should use template aliases</a>: In the absence of compiler
- support of template aliases the C++03 emulation define a nested typedef
- <code class="computeroutput"><span class="identifier">type</span></code>.
+ Rational arithmetic should use template aliases (see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3134.html#921" target="_top">Rational
+ Arithmetic should use template aliases</a>), but those are not
+ available in C++03, so inheritance is used instead.
             </li>
 </ul></div>
 <p>
- The current implementation provides in addition:
+ The current implementation extends the requirements of the C++0x draft
+ standard by making the copy constructor and copy assignment operator have
+ the same normalized form (see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3133.html#1281" target="_top">copy
+ constructor and assignment between ratios having the same normalized form</a>).
         </p>
-<div class="itemizedlist"><ul type="disc"><li>
- the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3133.html#1281" target="_top">copy
- constructor and assignement between ratios having the same normalized
- form</a>.
- </li></ul></div>
 </div>
 </div>
 <div class="section" lang="en">
@@ -1229,246 +1372,98 @@
 <a name="boost_ratio.reference.ratio_io_hpp"></a> Header <boost/ratio_io.hpp>
 </h3></div></div></div>
 <p>
- It provides a textual representation of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span>
- <span class="identifier">D</span><span class="special">&gt;</span></code>
- in the form of a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>. Other types such as <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">duration</span></code> can use these strings to aid in
- their I/O.
- </p>
-<p>
- This source has been adapted from the experimental header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">ratio_io</span><span class="special">&gt;</span></code>
- from Howard Hinnant. Porting to Boost has been trivial.
+ This header provides <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;&gt;</span></code> which can generate a textual representation
+ of a <code class="computeroutput"><span class="identifier">ratio</span><span class="special">&lt;&gt;</span></code>
+ in the form of a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;&gt;</span></code>.
+ These strings can be useful for I/O."
       </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
     
     <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Ratio</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">CharT</span><span class="special">&gt;</span>
     <span class="keyword">struct</span> <span class="identifier">ratio_string</span>
     <span class="special">{</span>
- <span class="keyword">static</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">&gt;</span> <span class="identifier">short_name</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">long_name</span><span class="special">();}</span>
+ <span class="keyword">static</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">&gt;</span> <span class="identifier">short_name</span><span class="special">();</span>
         <span class="keyword">static</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">&gt;</span> <span class="identifier">long_name</span><span class="special">();</span>
     <span class="special">};</span>
 
 <span class="special">}</span>
 </pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_ratio.appendices"></a>Appendices
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Appendix A: History</span></dt>
+<dd><dl><dt><span class="section">Version 1.0.0, ?? ??, 2010 </span></dt></dl></dd>
+<dt><span class="section"> Appendix B: Rationale</span></dt>
+<dt><span class="section"><a href="index.html#boost_ratio.appendices.implementation"> Appendix C: Implementation
+ Notes</a></span></dt>
+<dt><span class="section"> Appendix D: FAQ</span></dt>
+<dt><span class="section"><a href="index.html#boost_ratio.appendices.acknowledgements"> Appendix E:
+ Acknowledgements</a></span></dt>
+<dt><span class="section"> Appendix F: Future Plans</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_ratio.appendices.history"></a> Appendix A: History
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">Version 1.0.0, ?? ??, 2010 </span></dt></dl></div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_ratio.appendices.history.__version_1_0_0_________2010__"></a>Version 1.0.0, ?? ??, 2010
+</h4></div></div></div></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_ratio.appendices.rationale"></a> Appendix B: Rationale
+</h3></div></div></div>
+<a name="boost_ratio.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form"></a><h4>
+<a name="id5011704"></a>
+ <a href="index.html#boost_ratio.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form">Why
+ ratio needs CopyConstruction and Assignment from ratios having the same normalized
+ form</a>
+ </h4>
 <p>
- For each <code class="computeroutput"><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span> <span class="identifier">D</span><span class="special">&gt;</span></code> there exists a <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span>
- <span class="identifier">D</span><span class="special">&gt;,</span>
- <span class="identifier">CharT</span><span class="special">&gt;</span></code>
- for which you can query two strings: <code class="computeroutput"><span class="identifier">short_name</span></code>
- and <code class="computeroutput"><span class="identifier">long_name</span></code>. For those
- <code class="computeroutput"><span class="identifier">ratio</span></code>'s that correspond to
- an <a href="http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes" target="_top">SI
- prefix</a> long_name corresponds to the internationally recognized prefix,
- stored as a <code class="computeroutput"><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span></code>. For example <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">mega</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span></code>
- returns <code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="string">"mega"</span><span class="special">)</span></code>.
- For those <code class="computeroutput"><span class="identifier">ratio</span></code>'s that correspond
- to an <a href="http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes" target="_top">SI
- prefix</a> <code class="computeroutput"><span class="identifier">short_name</span></code>
- corresponds to the internationally recognized symbol, stored as a <code class="computeroutput"><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span></code>.
- For example <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">mega</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span></code>
- returns <code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="string">"M"</span><span class="special">)</span></code>.
- For all other <code class="computeroutput"><span class="identifier">ratio</span></code>'s, both
- <code class="computeroutput"><span class="identifier">long_name</span><span class="special">()</span></code>
- and <code class="computeroutput"><span class="identifier">short_name</span><span class="special">()</span></code>
- return a <code class="computeroutput"><span class="identifier">basic_string</span></code> containing
- "[<code class="computeroutput"><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">num</span><span class="special">/</span><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">den</span></code>]".
+ Current N3000 doesn't allows to copy-construct or
+ assign ratio instances of ratio classes having the same normalized form.
       </p>
 <p>
- <code class="computeroutput"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">,</span> <span class="identifier">D</span><span class="special">&gt;,</span> <span class="identifier">CharT</span><span class="special">&gt;</span></code> is only defined for four character types:
+ This simple example
       </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- <code class="computeroutput"><span class="keyword">char</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">char16_t</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">char32_t</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="keyword">wchar_t</span></code>
- </li>
-</ul></div>
+<pre class="programlisting"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">&gt;</span> <span class="identifier">r1</span><span class="special">;</span>
+<a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">&gt;</span> <span class="identifier">r2</span><span class="special">;</span>
+<span class="identifier">r1</span> <span class="special">=</span> <span class="identifier">r2</span><span class="special">;</span> <span class="comment">// (1)
+</span></pre>
 <p>
- When the character is char, UTF-8 will be used to encode the names. When
- the character is <code class="computeroutput"><span class="identifier">char16_t</span></code>,
- UTF-16 will be used to encode the names. When the character is <code class="computeroutput"><span class="identifier">char32_t</span></code>, UTF-32 will be used to encode
- the names. When the character is <code class="computeroutput"><span class="keyword">wchar_t</span></code>,
- the encoding will be UTF-16 if <code class="computeroutput"><span class="keyword">wchar_t</span></code>
- is 16 bits, and otherwise UTF-32.
- </p>
-<p>
- The <code class="computeroutput"><span class="identifier">short_name</span></code> for micro
- is defined by Unicode
- to be U+00B5.
- </p>
-<p>
- <span class="bold"><strong>Examples:</strong></span>
- </p>
-<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">ratio</span><span class="special">/</span><span class="identifier">ratio_io</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
-
-<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</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">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
-
- <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;deca, char&gt;::long_name() = "</span>
- <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
- <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;deca, char&gt;::short_name() = "</span>
- <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
-
- <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;giga, char&gt;::long_name() = "</span>
- <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
- <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;giga, char&gt;::short_name() = "</span>
- <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
-
- <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;ratio&lt;4, 6&gt;, char&gt;::long_name() = "</span>
- <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
- <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ratio_string&lt;ratio&lt;4, 6&gt;, char&gt;::short_name() = "</span>
- <span class="special">&lt;&lt;</span> <span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- The output will be
- </p>
-<pre class="programlisting"><span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">deca</span>
-<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">deca</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">da</span>
-<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">giga</span>
-<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">giga</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">=</span> <span class="identifier">G</span>
-<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">long_name</span><span class="special">()</span> <span class="special">=</span> <span class="special">[</span><span class="number">2</span><span class="special">/</span><span class="number">3</span><span class="special">]</span>
-<span class="identifier">ratio_string</span><span class="special">&lt;</span><span class="identifier">ratio</span><span class="special">&lt;</span><span class="number">4</span><span class="special">,</span> <span class="number">6</span><span class="special">&gt;,</span> <span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">short_name</span><span class="special">()</span> <span class="special">=</span> <span class="special">[</span><span class="number">2</span><span class="special">/</span><span class="number">3</span><span class="special">]</span>
-</pre>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_ratio.appendices"></a>Appendices
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"> Appendix A: History</span></dt>
-<dd><dl>
-<dt><span class="section">Version 0.2.1, September 27, 2010 </span></dt>
-<dt><span class="section">Version 0.2.0, September 22, 2010 </span></dt>
-<dt><span class="section">Version 0.1.0, September 10, 2010 </span></dt>
-</dl></dd>
-<dt><span class="section"> Appendix B: Rationale</span></dt>
-<dt><span class="section"><a href="index.html#boost_ratio.appendices.implementation"> Appendix C: Implementation
- Notes</a></span></dt>
-<dt><span class="section"> Appendix D: FAQ</span></dt>
-<dt><span class="section"><a href="index.html#boost_ratio.appendices.acknowledgements"> Appendix E:
- Acknowledgements</a></span></dt>
-<dt><span class="section"> Appendix F: Tests</span></dt>
-<dd><dl>
-<dt><span class="section">ratio</span></dt>
-<dt><span class="section">comparison</span></dt>
-<dt><span class="section">arithmetic</span></dt>
-</dl></dd>
-<dt><span class="section"> Appendix G: Tickets</span></dt>
-<dt><span class="section"> Appendix H: Future plans</span></dt>
-</dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="boost_ratio.appendices.history"></a> Appendix A: History
-</h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section">Version 0.2.1, September 27, 2010 </span></dt>
-<dt><span class="section">Version 0.2.0, September 22, 2010 </span></dt>
-<dt><span class="section">Version 0.1.0, September 10, 2010 </span></dt>
-</dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_ratio.appendices.history.__version_0_2_1__september_27__2010__"></a>Version 0.2.1, September 27, 2010
-</h4></div></div></div>
-<p>
- <span class="bold"><strong>Fixes:</strong></span>
- </p>
-<div class="itemizedlist"><ul type="disc"><li>
- Removal of LLVM adapted files due to incompatible License issue.
- </li></ul></div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_ratio.appendices.history.__version_0_2_0__september_22__2010__"></a>Version 0.2.0, September 22, 2010
-</h4></div></div></div>
-<p>
- <span class="bold"><strong>Featurs:</strong></span>
- </p>
-<div class="itemizedlist"><ul type="disc"><li>
- Added ratio_string traits.
- </li></ul></div>
-<p>
- <span class="bold"><strong>Fixes:</strong></span>
- </p>
-<div class="itemizedlist"><ul type="disc"><li>
- ratio_less overflow avoided following the algorithm from libc++.
- </li></ul></div>
-<p>
- <span class="bold"><strong>Test:</strong></span>
- </p>
-<div class="itemizedlist"><ul type="disc"><li>
- A more complete test has been included adapted from the test of from
- libc++/ratio.
- </li></ul></div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_ratio.appendices.history.__version_0_1_0__september_10__2010__"></a>Version 0.1.0, September 10, 2010
-</h4></div></div></div>
-<p>
- <span class="bold"><strong>Features:</strong></span>
- </p>
-<div class="itemizedlist"><ul type="disc"><li>
- Ratio has been extracted from Boost.Chrono.
- </li></ul></div>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="boost_ratio.appendices.rationale"></a> Appendix B: Rationale
-</h3></div></div></div>
-<a name="boost_ratio.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form"></a><h4>
-<a name="id5011468"></a>
- <a href="index.html#boost_ratio.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form">Why
- ratio needs CopyConstruction and Assignment from ratios having the same normalized
- form</a>
- </h4>
-<p>
- Current N3000 doesn't allows to copy-construct or
- assign ratio instances of ratio classes having the same normalized form.
- </p>
-<p>
- This simple example
- </p>
-<pre class="programlisting"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">&gt;</span> <span class="identifier">r1</span><span class="special">;</span>
-<a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
- ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">&gt;</span> <span class="identifier">r2</span><span class="special">;</span>
-<span class="identifier">r1</span> <span class="special">=</span> <span class="identifier">r2</span><span class="special">;</span> <span class="comment">// (1)
-</span></pre>
-<p>
- fails to compile in (1). Other example
+ fails to compile in (1). Other example
       </p>
 <pre class="programlisting"><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">&gt;</span> <span class="identifier">r1</span><span class="special">;</span>
-<span class="identifier">ratio_substract</span><span class="special">&lt;</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+<span class="identifier">ratio_subtract</span><span class="special">&lt;</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">&gt;,</span><a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">r2</span><span class="special">=</span><span class="identifier">r1</span><span class="special">;</span> <span class="comment">// (2)
 </span></pre>
 <p>
- The type of ratio<span class="underline">substract&lt;</span><span class="underline">ratio</span><span class="underline">&lt;2,3&gt;,</span><span class="underline">ratio</span>_&lt;1,3&gt; &gt; could be <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ The type of ratio<span class="underline">subtract&lt;</span><span class="underline">ratio</span><span class="underline">&lt;2,3&gt;,</span><span class="underline">ratio</span>_&lt;1,3&gt; &gt; could be <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>&lt;3,9&gt; so the compilation
         could fail in (2). It could also be <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>&lt;1,3&gt; and the compilation
         succeeds.
       </p>
 <a name="boost_ratio.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type"></a><h4>
-<a name="id5011873"></a>
+<a name="id5012108"></a>
         <a href="index.html#boost_ratio.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type">Why
         ratio needs the nested normalizer typedef type</a>
       </h4>
 <p>
- In N3000 20.4.2 and similar clauses
+ The current resolution of issue LWG 1281 acknowledges the need for a nested
+ type typedef, so Boost.Ratio is tracking the likely final version of std::ratio.
+ </p>
+<p>
+ [/ In N3000 20.4.2 and similar clauses
       </p>
 <p>
         <span class="emphasis"><em>3 The nested typedef type shall be a synonym for <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
@@ -1493,6 +1488,13 @@
         ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&lt;</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">r2</span><span class="special">;</span>
 <span class="identifier">r1</span> <span class="special">=</span> <span class="identifier">r2</span><span class="special">;</span> <span class="comment">// compiles as both types are the same.
 </span></pre>
+<p>
+ <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>&lt;1,3&gt;::type
+ r1; <a href="index.html#boost_ratio.reference.ratio_hpp.ratio" title=" Class Template
+ ratio&lt;&gt;"><code class="computeroutput"><span class="identifier">ratio</span></code></a>&lt;3,9&gt;::type
+ r2; r1 = r2; // compiles as both types are the same. ]
+ </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
@@ -1501,7 +1503,7 @@
       Notes</a>
 </h3></div></div></div>
 <a name="boost_ratio.appendices.implementation.how_boost_ratio_manage_with_compile_time_rational_arithmetic_overflow_"></a><h4>
-<a name="id5012136"></a>
+<a name="id5012416"></a>
         <a href="index.html#boost_ratio.appendices.implementation.how_boost_ratio_manage_with_compile_time_rational_arithmetic_overflow_">How
         Boost.Ratio manage with compile-time rational arithmetic overflow?</a>
       </h4>
@@ -1524,12 +1526,12 @@
             before doing the product.
           </li>
 <li>
- Use some equivalences relations that avoid addition or substraction can
- overflow or underflow.
+ Use some equivalences relations that avoid addition or subtraction that
+ can overflow or underflow.
           </li>
 </ul></div>
 <p>
- Next follows more detail:
+ The following subsections cover each case in more detail.
       </p>
 <p>
         <span class="bold"><strong>ratio_add</strong></span>
@@ -1542,48 +1544,52 @@
 <p>
         either n1*d2+n2*d1 or d1*d2 can overflow.
       </p>
-<pre class="programlisting"> <span class="special">(</span> <span class="special">(</span><span class="identifier">n1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">n2</span> <span class="special">*</span> <span class="identifier">d1</span><span class="special">)</span> <span class="special">)</span>
-<span class="special">/</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span>
+<pre class="programlisting"><span class="special">(</span> <span class="special">(</span><span class="identifier">n1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">n2</span> <span class="special">*</span> <span class="identifier">d1</span><span class="special">)</span> <span class="special">)</span>
+<span class="special">--------------------------</span>
+ <span class="special">(</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span>
 </pre>
 <p>
         Dividing by gcd(d1,d2) on both num and den
       </p>
-<pre class="programlisting"> <span class="special">(</span> <span class="special">(</span><span class="identifier">n1</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span>
- <span class="special">(</span><span class="identifier">n2</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span>
- <span class="special">)</span>
-<span class="special">/</span> <span class="special">((</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))</span>
+<pre class="programlisting"><span class="special">(</span> <span class="special">(</span><span class="identifier">n1</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">n2</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">)</span>
+<span class="special">----------------------------------------------------</span>
+ <span class="special">((</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))</span>
 </pre>
 <p>
         Multipliying and diving by gcd(n1,n2) in numerator
       </p>
-<pre class="programlisting"> <span class="special">(</span> <span class="special">((</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)*(</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span>
- <span class="special">((</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)*(</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span>
- <span class="special">)</span>
-<span class="special">/</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)</span> <span class="special">)</span>
+<pre class="programlisting"><span class="special">(</span> <span class="special">((</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)*(</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span>
+ <span class="special">((</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)*(</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span>
+<span class="special">)</span>
+<span class="special">--------------------------------------------------</span>
+ <span class="special">(</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)</span> <span class="special">)</span>
 </pre>
 <p>
         Factorizing gcd(n1,n2)
       </p>
-<pre class="programlisting"> <span class="special">(</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)</span> <span class="special">*</span>
- <span class="special">(</span> <span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span> <span class="special">((</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(<
/span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">)</span>
- <span class="special">)</span>
-<span class="special">/</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)</span> <span class="special">)</span>
+<pre class="programlisting"><span class="special">(</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)</span> <span class="special">*</span>
+ <span class="special">(</span> <span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span> <span class="special">((</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</s
pan><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">)</span>
+<span class="special">)</span>
+<span class="special">-------------------------------------------------------------------------------</span>
+ <span class="special">(</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">*</span> <span class="identifier">d2</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)</span> <span class="special">)</span>
 </pre>
 <p>
         Regrouping
       </p>
-<pre class="programlisting"> <span class="special">(</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)</span> <span class="special">*</span>
- <span class="special">(</span> <span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span> <span class="special">((</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(<
/span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">)</span>
- <span class="special">)</span>
-<span class="special">/</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))</span> <span class="special">*</span> <span class="identifier">d2</span> <span class="special">)</span>
+<pre class="programlisting"><span class="special">(</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)</span> <span class="special">*</span>
+ <span class="special">(</span> <span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span> <span class="special">((</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</s
pan><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">)</span>
+<span class="special">)</span>
+<span class="special">-------------------------------------------------------------------------------</span>
+ <span class="special">(</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))</span> <span class="special">*</span> <span class="identifier">d2</span> <span class="special">)</span>
 </pre>
 <p>
         Dividing by (d1 / gcd(d1,d2))
       </p>
-<pre class="programlisting"> <span class="special">(</span> <span class="special">(</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)</span> <span class="special">/</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))</span> <span class="special">)</span> <span class="special">*</span>
- <span class="special">(</span> <span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span> <span class="special">((</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(<
/span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">)</span>
- <span class="special">)</span>
-<span class="special">/</span> <span class="identifier">d2</span>
+<pre class="programlisting"><span class="special">(</span> <span class="special">(</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">)</span> <span class="special">/</span> <span class="special">(</span><span class="identifier">d1</span> <span class="special">/</span> <span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))</span> <span class="special">)</span> <span class="special">*</span>
+ <span class="special">(</span> <span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">+</span> <span class="special">((</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">n2</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</s
pan><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcd</span><span class="special">(</span><span class="identifier">d1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span> <span class="special">)</span>
+<span class="special">)</span>
+<span class="special">-------------------------------------------------------------------------------</span>
+ <span class="identifier">d2</span>
 </pre>
 <p>
         Dividing by d2
@@ -1613,14 +1619,16 @@
 <p>
         Dividing by gcc(n1,d2) numerator and denominator
       </p>
-<pre class="programlisting"> <span class="special">(((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))*</span><span class="identifier">n2</span><span class="special">)</span>
-<span class="special">/</span> <span class="special">(</span><span class="identifier">d1</span><span class="special">*(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))))</span>
+<pre class="programlisting"><span class="special">(((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))*</span><span class="identifier">n2</span><span class="special">)</span>
+<span class="special">---------------------</span>
+<span class="special">(</span><span class="identifier">d1</span><span class="special">*(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))))</span>
 </pre>
 <p>
         Dividing by gcc(n2,d1)
       </p>
-<pre class="programlisting"> <span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))*(</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n2</span><span class="special">,</span><span class="identifier">d1</span><span class="special">)))</span>
-<span class="special">/</span> <span class="special">((</span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n2</span><span class="special">,</span><span class="identifier">d1</span><span class="special">))*(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span>
+<pre class="programlisting"><span class="special">((</span><span class="identifier">n1</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">))*(</span><span class="identifier">n2</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n2</span><span class="special">,</span><span class="identifier">d1</span><span class="special">)))</span>
+<span class="special">---------------------------------</span>
+<span class="special">((</span><span class="identifier">d1</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n2</span><span class="special">,</span><span class="identifier">d1</span><span class="special">))*(</span><span class="identifier">d2</span><span class="special">/</span><span class="identifier">gcc</span><span class="special">(</span><span class="identifier">n1</span><span class="special">,</span><span class="identifier">d2</span><span class="special">)))</span>
 </pre>
 <p>
         And now all the initial numerator and denominators have been reduced, avoiding
@@ -1989,824 +1997,38 @@
         Terry Golubiewski, Daniel Krugler, Anthony Williams.
       </p>
 <p>
- Thanks to Adrew Chinoff for his help polishing the documentation.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="boost_ratio.appendices.tests"></a> Appendix F: Tests
-</h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section">ratio</span></dt>
-<dt><span class="section">comparison</span></dt>
-<dt><span class="section">arithmetic</span></dt>
-</dl></div>
-<p>
- In order to test you need to do.
+ The ratio.hpp source has been adapted from the experimental header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">ratio_io</span><span class="special">&gt;</span></code> from Howard Hinnant.
       </p>
-<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">libs</span><span class="special">/</span><span class="identifier">ratio</span><span class="special">/</span><span class="identifier">test</span>
-</pre>
 <p>
- You can also run a specific suite of test by doing
+ Thanks to Adrew Chinoff for his help polishing the documentation.
       </p>
-<pre class="programlisting"><span class="identifier">cd</span> <span class="identifier">libs</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">test</span>
-<span class="identifier">bjam</span> <span class="identifier">ratio</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_ratio.appendices.tests._ratio_"></a>ratio
-</h4></div></div></div>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
- <p>
- kind
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-<th>
- <p>
- Result
- </p>
- </th>
-<th>
- <p>
- Ticket
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- typedefs.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check the num/den are correct for the predefined typedefs
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check the num/den are correctly simplified
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio1.fail
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- The template argument D shall not be zero
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio2.fail
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- the absolute values of the template arguments N and D shall be
- representable by type intmax_t
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio3.fail
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- the absolute values of the template arguments N and D shall be
- representable by type intmax_t
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
 </div>
 <div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_ratio.appendices.tests._comparison_"></a>comparison
-</h4></div></div></div>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
- <p>
- kind
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-<th>
- <p>
- Result
- </p>
- </th>
-<th>
- <p>
- Ticket
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- ratio_equal.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_equal metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_not_equal.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_not_equal metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_less.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_less metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_less_equal.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_less_equal metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_greater.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_greater metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_greater_equal.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_greater_equal metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_ratio.appendices.tests._arithmetic_"></a>arithmetic
-</h4></div></div></div>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
- <p>
- kind
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-<th>
- <p>
- Result
- </p>
- </th>
-<th>
- <p>
- Ticket
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- ratio_add.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_add metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_substract.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_substract metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_multiply.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_multiply metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_divide.pass
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- check ratio_divide metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_add.fail
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- check ratio_add overflow metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_substract.fail
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- check ratio_substract underflow metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_multiply.fail
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- check ratio_multiply overflow metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_divide.fail
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- check ratio_divide overflow metafunction class
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="boost_ratio.appendices.tickets"></a> Appendix G: Tickets
-</h3></div></div></div>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Ticket
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-<th>
- <p>
- Resolution
- </p>
- </th>
-<th>
- <p>
- State
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- 1
- </p>
- </td>
-<td>
- <p>
- result of metafunctions ratio_multiply and ratio_divide were not
- normalized ratios
- </p>
- </td>
-<td>
- <p>
- Use of the nested ratio typedef type on ratio arithmetic operations.
- </p>
- </td>
-<td>
- <p>
- Closed
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- 2
- </p>
- </td>
-<td>
- <p>
- INTMAX_C is not always defined
- </p>
- </td>
-<td>
- <p>
- Replace INTMAX_C by BOOST_INTMAX_C until boost/cstdint.hpp ensures
- INTMAX_C is always defined.
- </p>
- </td>
-<td>
- <p>
- Closed
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- 3
- </p>
- </td>
-<td>
- <p>
- MSVC reports a warning instead of an error when there is an integral
- constant overflow
- </p>
- </td>
-<td>
- <p>
- manage with MSVC reporting a warning instead of an error when there
- is an integral constant overflow
- </p>
- </td>
-<td>
- <p>
- Closed
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- 4
- </p>
- </td>
-<td>
- <p>
- ration_less overflow on cases where it can be avoided
- </p>
- </td>
-<td>
- <p>
- Change the algorithm as implemented in libc++
- </p>
- </td>
-<td>
- <p>
- Closed
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<p>
- [
- </p>
-<div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_ratio.appendices.todo"></a> Appendix H: Future plans
+<a name="boost_ratio.appendices.todo"></a> Appendix F: Future Plans
 </h3></div></div></div>
 <a name="boost_ratio.appendices.todo.for_later_releases"></a><h4>
-<a name="id5017777"></a>
+<a name="id5016748"></a>
         <a href="index.html#boost_ratio.appendices.todo.for_later_releases">For later
         releases</a>
       </h4>
-<p>
- Implement <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3135.html#3135" target="_top">multiple
- arguments</a> ratio arithmetic.
- </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Use constexpr on compiler providing it
+ </li>
+<li>
+ Use template aliases on compiler providing it
+ </li>
+<li>
+ Implement <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3135.html#3135" target="_top">multiple
+ arguments</a> ratio arithmetic.
+ </li>
+</ul></div>
 </div>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: September 27, 2010 at 18:56:54 GMT</small></p></td>
+<td align="left"><p><small>Last revised: October 12, 2010 at 19:59:00 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>


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