Boost logo

Boost-Commit :

From: hinnant_at_[hidden]
Date: 2007-12-30 14:33:35


Author: hinnant
Date: 2007-12-30 14:33:34 EST (Sun, 30 Dec 2007)
New Revision: 42376
URL: http://svn.boost.org/trac/boost/changeset/42376

Log:
Corrected bug in <hdate_time> __choose_duration.

Text files modified:
   sandbox/committee/LWG/ref_impl/hdate_time | 34 ++++++++--------------------------
   1 files changed, 8 insertions(+), 26 deletions(-)

Modified: sandbox/committee/LWG/ref_impl/hdate_time
==============================================================================
--- sandbox/committee/LWG/ref_impl/hdate_time (original)
+++ sandbox/committee/LWG/ref_impl/hdate_time 2007-12-30 14:33:34 EST (Sun, 30 Dec 2007)
@@ -288,24 +288,24 @@
 
 // __gcd
 
-template <long X, long Y>
+template <long long X, long long Y>
 struct __gcd
 {
- static const long value = __gcd<Y, X % Y>::value;
+ static const long long value = __gcd<Y, X % Y>::value;
 };
 
-template <long X>
+template <long long X>
 struct __gcd<X, 0>
 {
- static const long value = X;
+ static const long long value = X;
 };
 
 // __lcm
 
-template <long X, long Y>
+template <long long X, long long Y>
 struct __lcm
 {
- static const long value = X / __gcd<X, Y>::value * Y;
+ static const long long value = X / __gcd<X, Y>::value * Y;
 };
 
 // __is_duration
@@ -586,8 +586,8 @@
 // __choose_duration
 
 template <class LhsDuration, class RhsDuration,
- bool = __is_duration_exactly_convertible<RhsDuration, LhsDuration>::value,
- bool = __is_duration_exactly_convertible<LhsDuration, RhsDuration>::value>
+ bool = __is_duration<LhsDuration>::value,
+ bool = __is_duration<RhsDuration>::value>
 struct __choose_duration
 {
 };
@@ -595,24 +595,6 @@
 template <class LhsDuration, class RhsDuration>
 struct __choose_duration<LhsDuration, RhsDuration, true, true>
 {
- typedef LhsDuration type;
-};
-
-template <class LhsDuration, class RhsDuration>
-struct __choose_duration<LhsDuration, RhsDuration, true, false>
-{
- typedef LhsDuration type;
-};
-
-template <class LhsDuration, class RhsDuration>
-struct __choose_duration<LhsDuration, RhsDuration, false, true>
-{
- typedef RhsDuration type;
-};
-
-template <class LhsDuration, class RhsDuration>
-struct __choose_duration<LhsDuration, RhsDuration, false, false>
-{
     typedef typename __make_duration<LhsDuration, RhsDuration>::type type;
 };
 


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