Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65570 - in sandbox/conversion/boost/conversion: . boost
From: vicente.botet_at_[hidden]
Date: 2010-09-24 03:24:50


Author: viboes
Date: 2010-09-24 03:24:49 EDT (Fri, 24 Sep 2010)
New Revision: 65570
URL: http://svn.boost.org/trac/boost/changeset/65570

Log:
Conversion 0.5: warning removal
Text files modified:
   sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp | 4 ++--
   sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp | 2 +-
   sandbox/conversion/boost/conversion/ca_wrapper.hpp | 10 ++++++++--
   3 files changed, 11 insertions(+), 5 deletions(-)

Modified: sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp 2010-09-24 03:24:49 EDT (Fri, 24 Sep 2010)
@@ -30,7 +30,7 @@
                 rep_t d = chrono::duration_cast<duration_t>(from).count();
                 rep_t sec = d/1000000000;
                 rep_t nsec = d%1000000000;
- return posix_time::seconds(static_cast<long>(sec))+
+ return posix_time::seconds(static_cast<long long>(sec))+
 #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
                         posix_time::nanoseconds(nsec);
 #else
@@ -75,7 +75,7 @@
             rep_t d = chrono::duration_cast<duration_t>(from).count();
             rep_t sec = d/1000000000;
             rep_t nsec = d%1000000000;
- return posix_time::seconds(static_cast<long>(sec))+
+ return posix_time::seconds(static_cast<long long>(sec))+
 #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
                     posix_time::nanoseconds(nsec);
 #else

Modified: sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp 2010-09-24 03:24:49 EDT (Fri, 24 Sep 2010)
@@ -109,7 +109,7 @@
         {
             time_duration const time_since_epoch=from-from_time_t(0);
             TP t=chrono::system_clock::from_time_t(time_since_epoch.total_seconds());
- long nsec=time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second());
+ long long nsec=time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second());
             return t+chrono::duration_cast<typename TP::duration>(chrono::nanoseconds(nsec));
         }
 

Modified: sandbox/conversion/boost/conversion/ca_wrapper.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/ca_wrapper.hpp (original)
+++ sandbox/conversion/boost/conversion/ca_wrapper.hpp 2010-09-24 03:24:49 EDT (Fri, 24 Sep 2010)
@@ -21,14 +21,20 @@
         class ca_wrapper {
             T& ref_;
         public:
+ ca_wrapper(ca_wrapper const& r) : ref_(r.ref_) { }
             ca_wrapper(T& r) : ref_(r) {}
             template <typename U>
             operator U() {
                 return boost::convert_to<U>(ref_);
             }
+ ca_wrapper& operator =(ca_wrapper<T> const& u) {
+ boost::assign_to(ref_, u.ref_);
+ return *this;
+ }
             template <typename U>
- T& operator =(U const& u) {
- return boost::assign_to(ref_, u);
+ ca_wrapper& operator =(U const& u) {
+ boost::assign_to(ref_, u);
+ return *this;
             }
         };
     }


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