|
Boost-Commit : |
From: hinnant_at_[hidden]
Date: 2007-12-06 16:22:04
Author: hinnant
Date: 2007-12-06 16:22:04 EST (Thu, 06 Dec 2007)
New Revision: 41804
URL: http://svn.boost.org/trac/boost/changeset/41804
Log:
Removed * and / from Duration spec and created these as free functions
Text files modified:
sandbox/committee/branches/date_time/thread_library.html | 74 +++++++++++++++++++++++++++------------
1 files changed, 51 insertions(+), 23 deletions(-)
Modified: sandbox/committee/branches/date_time/thread_library.html
==============================================================================
--- sandbox/committee/branches/date_time/thread_library.html (original)
+++ sandbox/committee/branches/date_time/thread_library.html 2007-12-06 16:22:04 EST (Thu, 06 Dec 2007)
@@ -3500,6 +3500,14 @@
<i>FRDuration</i> operator+(const LhsDuration& lhs, const RhsDuration& rhs)
template <class LhsDuration, class RhsDuration>
<i>FRDuration</i> operator-(const LhsDuration& lhs, const RhsDuration& rhs)
+
+template <class Duration>
+ Duration operator*(Duration lhs, long rhs)
+template <class Duration>
+ Duration operator*(long lhs, Duration rhs)
+
+template <class Duration>
+ Duration operator/(Duration lhs, long rhs)
} // std</code></pre>
</blockquote>
@@ -3591,22 +3599,12 @@
resolution of <code>D</code>. A diagnostic is required.</td>
</tr>
<tr>
- <td valign="top" width="25%"><code>d / c</code></td>
- <td valign="top" width="11%"><code>D</code></td>
- <td valign="top" width="39%"><code>D(d.tick_count()/c)</code></td>
- </tr>
- <tr>
<td valign="top" width="25%"><code>d /= c</code></td>
<td valign="top" width="11%"><code>D&</code></td>
<td valign="top" width="39%"><i>Postcondition:</i> <code>d.tick_count() ==
d.tick_count()</code><sub>at-entry</sub><code>/c</code></td>
</tr>
<tr>
- <td valign="top" width="25%"><code>d * c</code></td>
- <td valign="top" width="11%"><code>D</code></td>
- <td valign="top" width="39%"><code>D(d.tick_count()*c)</code></td>
- </tr>
- <tr>
<td valign="top" width="25%"><code>d *= c</code></td>
<td valign="top" width="11%"><code>D&</code></td>
<td valign="top" width="39%"><i>Postcondition:</i> <code>d.tick_count()
@@ -3655,8 +3653,6 @@
// <i>operations</i>
nanoseconds operator-() const;
- nanoseconds operator*(long multiplier) const;
- nanoseconds operator/(long divisor) const;
};</code></pre>
</blockquote>
@@ -3715,8 +3711,6 @@
// <i>operations</i>
microseconds operator-() const;
- microseconds operator*(long multiplier) const;
- microseconds operator/(long divisor) const;
// <em>conversions</em>
operator nanoseconds() const;
@@ -3791,8 +3785,6 @@
// <i>operations</i>
milliseconds operator-() const;
- milliseconds operator*(long multiplier) const;
- milliseconds operator/(long divisor) const;
// <em>conversions</em>
operator nanoseconds() const;
@@ -3881,8 +3873,6 @@
// <i>operations</i>
seconds operator-() const;
- seconds operator*(long multiplier) const;
- seconds operator/(long divisor) const;
// <em>conversions</em>
operator nanoseconds() const;
@@ -3984,8 +3974,6 @@
// <i>operations</i>
minutes operator-() const;
- minutes operator*(long multiplier) const;
- minutes operator/(long divisor) const;
// <em>conversions</em>
operator nanoseconds() const;
@@ -4100,8 +4088,6 @@
// <i>operations</i>
hours operator-() const;
- hours operator*(long multiplier) const;
- hours operator/(long divisor) const;
// <em>conversions</em>
operator nanoseconds() const;
@@ -4621,8 +4607,50 @@
x is lhs.count() </code>converted to the resolution of <code>RhsDuration</code>.</dd>
</dl>
- <p> </p>
</blockquote>
+
+<pre><code>template <class Duration>
+ Duration operator*(Duration lhs, long rhs)
+</code></pre>
+<blockquote>
+<dl>
+
+<dt>Returns:</dt>
+<dd>
+<code>lhs *= rhs</code>.
+</dd>
+
+</dl>
+</blockquote>
+
+<pre><code>template <class Duration>
+ Duration operator*(long lhs, Duration rhs)
+</code></pre>
+<blockquote>
+<dl>
+
+<dt>Returns:</dt>
+<dd>
+<code>rhs *= lhs</code>.
+</dd>
+
+</dl>
+</blockquote>
+
+<pre><code>template <class Duration>
+ Duration operator/(Duration lhs, long rhs)
+</code></pre>
+<blockquote>
+<dl>
+
+<dt>Returns:</dt>
+<dd>
+<code>lhs /= rhs</code>.
+</dd>
+
+</dl>
+</blockquote>
+
<h2><a name="References">References</a></h2>
<ul>
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