|
Boost-Commit : |
From: hinnant_at_[hidden]
Date: 2008-01-07 15:53:08
Author: hinnant
Date: 2008-01-07 15:53:08 EST (Mon, 07 Jan 2008)
New Revision: 42585
URL: http://svn.boost.org/trac/boost/changeset/42585
Log:
Applied proposed wording for V1 issue 63.
Text files modified:
sandbox/committee/LWG/thread_library.html | 82 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 79 insertions(+), 3 deletions(-)
Modified: sandbox/committee/LWG/thread_library.html
==============================================================================
--- sandbox/committee/LWG/thread_library.html (original)
+++ sandbox/committee/LWG/thread_library.html 2008-01-07 15:53:08 EST (Mon, 07 Jan 2008)
@@ -3819,6 +3819,28 @@
</p>
<p>
+A duration type <code>E</code> is said to be <i>exactly convertible</i>
+to another duration type <code>D</code> if and only if:
+</p>
+
+<ul>
+<li>
+<code>E::is_subsecond</code> is <code>false</code> and
+<code>D::is_subsecond</code> is <code>true</code>, or
+</li>
+<li>
+<code>E::is_subsecond</code> is <code>false</code> and
+<code>D::is_subsecond</code> is <code>false</code> and
+<code>E::seconds_per_tick % D::seconds_per_tick == 0</code> , or
+</li>
+<li>
+<code>E::is_subsecond</code> is <code>true</code> and
+<code>D::is_subsecond</code> is <code>true</code> and
+<code>D::ticks_per_second % E::ticks_per_second == 0</code>.
+</li>
+</ul>
+
+<p>
A duration type shall be EqualityComparable, LessThanComparable,
CopyConstructible, DefaultConstructible, CopyAssignable, Swappable, and
Destructible.
@@ -3829,9 +3851,7 @@
<code>d0</code> denotes <code>d.tick_count()</code> at entry into the function,
<code>e</code> denotes a <code>const</code> value of type <code>E</code>,
<code>c</code> denotes a <code>long</code> value.
-The resolution of <code>E</code>
-shall not be finer than the resolution of <code>D</code>
-(diagnostic required).
+<code>E</code> shall be exactly convertible to <code>D</code> (diagnostic required).
</p>
<table>
<tr>
@@ -4889,6 +4909,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code>FinestDuration(<var>lhs</var>.count()) == FinestDuration(<var>rhs</var>.count())<br>
@@ -4904,6 +4931,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code>!(<var>lhs</var>==<var>rhs</var>)</code>.
@@ -4918,6 +4952,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code>FinestDuration(<var>lhs</var>.count()) < FinestDuration(<var>rhs</var>.count())<br>
@@ -4933,6 +4974,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code>!(<var>rhs</var><<var>lhs</var>)</code>.
@@ -4947,6 +4995,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code><var>rhs</var><<var>lhs</var></code>.
@@ -4961,6 +5016,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code>!(<var>lhs</var><<var>rhs</var>)</code>.
@@ -4975,6 +5037,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code>FinestDuration(<var>lhs</var>.count())+FinestDuration(<var>rhs</var>.count())<br>
@@ -4990,6 +5059,13 @@
<blockquote>
<dl>
+<dt>Requires:</dt>
+<dd>
+Either
+<code>LhsDuration</code> shall be exactly convertible to <code>RhsDuration</code> or
+<code>RhsDuration</code> shall be exactly convertible to <code>LhsDuration</code> (diagnostic required).
+</dd>
+
<dt>Returns:</dt>
<dd>
<code>FinestDuration(<var>lhs</var>.count())-FinestDuration(<var>rhs</var>.count())<br>
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