|
Boost-Commit : |
From: hinnant_at_[hidden]
Date: 2007-12-06 11:16:13
Author: hinnant
Date: 2007-12-06 11:16:12 EST (Thu, 06 Dec 2007)
New Revision: 41790
URL: http://svn.boost.org/trac/boost/changeset/41790
Log:
renamed get_count to count
Text files modified:
sandbox/committee/LWG/ref_impl/condition_variable.cpp | 2
sandbox/committee/LWG/ref_impl/hdate_time | 156 ++++++++++++++++++++--------------------
sandbox/committee/LWG/ref_impl/thread | 2
3 files changed, 80 insertions(+), 80 deletions(-)
Modified: sandbox/committee/LWG/ref_impl/condition_variable.cpp
==============================================================================
--- sandbox/committee/LWG/ref_impl/condition_variable.cpp (original)
+++ sandbox/committee/LWG/ref_impl/condition_variable.cpp 2007-12-06 11:16:12 EST (Thu, 06 Dec 2007)
@@ -20,7 +20,7 @@
{
timespec ts;
ts.tv_sec = t.seconds_since_epoch();
- ts.tv_nsec = static_cast<long>(t.nanoseconds_since_epoch().get_count() % system_time::ticks_per_second());
+ ts.tv_nsec = static_cast<long>(t.nanoseconds_since_epoch().count() % system_time::ticks_per_second);
return ts;
}
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-06 11:16:12 EST (Thu, 06 Dec 2007)
@@ -37,7 +37,7 @@
nanoseconds& operator*=(long rhs);
nanoseconds& operator/=(long divisor);
- tick_type get_count() const;
+ tick_type count() const;
};
class microseconds
@@ -68,7 +68,7 @@
microseconds& operator*=(long rhs);
microseconds& operator/=(long divisor);
- tick_type get_count() const;
+ tick_type count() const;
};
class milliseconds
@@ -100,7 +100,7 @@
milliseconds& operator*=(long rhs);
milliseconds& operator/=(long divisor);
- tick_type get_count() const;
+ tick_type count() const;
};
class seconds
@@ -133,7 +133,7 @@
seconds& operator*=(long rhs);
seconds& operator/=(long divisor);
- tick_type get_count() const;
+ tick_type count() const;
};
class minutes
@@ -167,7 +167,7 @@
minutes& operator*=(long rhs);
minutes& operator/=(long divisor);
- tick_type get_count() const;
+ tick_type count() const;
};
class hours
@@ -202,7 +202,7 @@
hours& operator*=(long rhs);
hours& operator/=(long divisor);
- tick_type get_count() const;
+ tick_type count() const;
};
template <class LhsDuration, class RhsDuration>
@@ -304,7 +304,7 @@
{
struct two {char x; char y;};
template <class U> static two test(...);
- template <class U> static char test(__member_wrapper<typename U::tick_type (U::*)() const, &U::get_count>*);
+ template <class U> static char test(__member_wrapper<typename U::tick_type (U::*)() const, &U::count>*);
public:
static const bool value = sizeof(test<T>(0)) == 1;
};
@@ -345,7 +345,7 @@
nanoseconds& operator*=(long rhs) {ns_ *= rhs; return *this;}
nanoseconds& operator/=(long divisor) {ns_ /= divisor; return *this;}
- tick_type get_count() const {return ns_;}
+ tick_type count() const {return ns_;}
};
class microseconds
@@ -378,7 +378,7 @@
microseconds& operator*=(long rhs) {us_ *= rhs; return *this;}
microseconds& operator/=(long divisor) {us_ /= divisor; return *this;}
- tick_type get_count() const {return us_;}
+ tick_type count() const {return us_;}
};
class milliseconds
@@ -412,7 +412,7 @@
milliseconds& operator*=(long rhs) {ms_ *= rhs; return *this;}
milliseconds& operator/=(long divisor) {ms_ /= divisor; return *this;}
- tick_type get_count() const {return ms_;}
+ tick_type count() const {return ms_;}
};
class seconds
@@ -448,7 +448,7 @@
seconds& operator/=(long divisor) {s_ /= divisor; return *this;}
- tick_type get_count() const {return s_;}
+ tick_type count() const {return s_;}
};
class minutes
@@ -484,7 +484,7 @@
minutes& operator*=(long rhs) {mn_ *= rhs; return *this;}
minutes& operator/=(long divisor) {mn_ /= divisor; return *this;}
- tick_type get_count() const {return mn_;}
+ tick_type count() const {return mn_;}
};
class hours
@@ -521,7 +521,7 @@
hours& operator*=(long rhs) {hr_ *= rhs; return *this;}
hours& operator/=(long divisor) {hr_ /= divisor; return *this;}
- tick_type get_count() const {return hr_;}
+ tick_type count() const {return hr_;}
};
template <class To>
@@ -531,28 +531,28 @@
static To
__from(const Duration& t, true_type, true_type)
{
- return To(t.get_count() * To::ticks_per_second / Duration::ticks_per_second);
+ return To(t.count() * To::ticks_per_second / Duration::ticks_per_second);
}
template <class Duration>
static To
__from(const Duration& t, false_type, true_type)
{
- return To(t.get_count() / To::seconds_per_tick / Duration::ticks_per_second);
+ return To(t.count() / To::seconds_per_tick / Duration::ticks_per_second);
}
template <class Duration>
static To
__from(const Duration& t, true_type, false_type)
{
- return To(t.get_count() * To::ticks_per_second * Duration::seconds_per_tick);
+ return To(t.count() * To::ticks_per_second * Duration::seconds_per_tick);
}
template <class Duration>
static To
__from(const Duration& t, false_type, false_type)
{
- return To(t.get_count() * Duration::seconds_per_tick / To::seconds_per_tick);
+ return To(t.count() * Duration::seconds_per_tick / To::seconds_per_tick);
}
public:
template <class Duration>
@@ -572,14 +572,14 @@
static nanoseconds
__from(const Duration& t, true_type)
{
- return nanoseconds(t.get_count() * nanoseconds::ticks_per_second / Duration::ticks_per_second);
+ return nanoseconds(t.count() * nanoseconds::ticks_per_second / Duration::ticks_per_second);
}
template <class Duration>
static nanoseconds
__from(const Duration& t, false_type)
{
- return nanoseconds(t.get_count() * nanoseconds::ticks_per_second * Duration::seconds_per_tick);
+ return nanoseconds(t.count() * nanoseconds::ticks_per_second * Duration::seconds_per_tick);
}
public:
@@ -602,35 +602,35 @@
nanoseconds
from(const microseconds& t)
{
- return nanoseconds(t.get_count() * 1000LL);
+ return nanoseconds(t.count() * 1000LL);
}
static
nanoseconds
from(const milliseconds& t)
{
- return nanoseconds(t.get_count() * 1000000LL);
+ return nanoseconds(t.count() * 1000000LL);
}
static
nanoseconds
from(const seconds& t)
{
- return nanoseconds(t.get_count() * 1000000000LL);
+ return nanoseconds(t.count() * 1000000000LL);
}
static
nanoseconds
from(const minutes& t)
{
- return nanoseconds(t.get_count() * 60000000000LL);
+ return nanoseconds(t.count() * 60000000000LL);
}
static
nanoseconds
from(const hours& t)
{
- return nanoseconds(t.get_count() * 3600000000000LL);
+ return nanoseconds(t.count() * 3600000000000LL);
}
};
@@ -641,14 +641,14 @@
static microseconds
__from(const Duration& t, true_type)
{
- return microseconds(t.get_count() * microseconds::ticks_per_second / Duration::ticks_per_second);
+ return microseconds(t.count() * microseconds::ticks_per_second / Duration::ticks_per_second);
}
template <class Duration>
static microseconds
__from(const Duration& t, false_type)
{
- return microseconds(t.get_count() * microseconds::ticks_per_second * Duration::seconds_per_tick);
+ return microseconds(t.count() * microseconds::ticks_per_second * Duration::seconds_per_tick);
}
public:
@@ -664,7 +664,7 @@
microseconds
from(const nanoseconds& t)
{
- return microseconds(t.get_count() / 1000LL);
+ return microseconds(t.count() / 1000LL);
}
static
@@ -678,28 +678,28 @@
microseconds
from(const milliseconds& t)
{
- return microseconds(t.get_count() * 1000LL);
+ return microseconds(t.count() * 1000LL);
}
static
microseconds
from(const seconds& t)
{
- return microseconds(t.get_count() * 1000000LL);
+ return microseconds(t.count() * 1000000LL);
}
static
microseconds
from(const minutes& t)
{
- return microseconds(t.get_count() * 60000000LL);
+ return microseconds(t.count() * 60000000LL);
}
static
microseconds
from(const hours& t)
{
- return microseconds(t.get_count() * 3600000000LL);
+ return microseconds(t.count() * 3600000000LL);
}
};
@@ -710,14 +710,14 @@
static milliseconds
__from(const Duration& t, true_type)
{
- return milliseconds(t.get_count() * milliseconds::ticks_per_second / Duration::ticks_per_second);
+ return milliseconds(t.count() * milliseconds::ticks_per_second / Duration::ticks_per_second);
}
template <class Duration>
static milliseconds
__from(const Duration& t, false_type)
{
- return milliseconds(t.get_count() * milliseconds::ticks_per_second * Duration::seconds_per_tick);
+ return milliseconds(t.count() * milliseconds::ticks_per_second * Duration::seconds_per_tick);
}
public:
@@ -733,14 +733,14 @@
milliseconds
from(const nanoseconds& t)
{
- return milliseconds(t.get_count() / 1000000LL);
+ return milliseconds(t.count() / 1000000LL);
}
static
milliseconds
from(const microseconds& t)
{
- return milliseconds(t.get_count() / 1000LL);
+ return milliseconds(t.count() / 1000LL);
}
static
@@ -754,21 +754,21 @@
milliseconds
from(const seconds& t)
{
- return milliseconds(t.get_count() * 1000LL);
+ return milliseconds(t.count() * 1000LL);
}
static
milliseconds
from(const minutes& t)
{
- return milliseconds(t.get_count() * 60000LL);
+ return milliseconds(t.count() * 60000LL);
}
static
milliseconds
from(const hours& t)
{
- return milliseconds(t.get_count() * 3600000LL);
+ return milliseconds(t.count() * 3600000LL);
}
};
@@ -779,14 +779,14 @@
static seconds
__from(const Duration& t, true_type)
{
- return seconds(t.get_count() / seconds::seconds_per_tick / Duration::ticks_per_second);
+ return seconds(t.count() / seconds::seconds_per_tick / Duration::ticks_per_second);
}
template <class Duration>
static seconds
__from(const Duration& t, false_type)
{
- return seconds(t.get_count() * Duration::seconds_per_tick / seconds::seconds_per_tick);
+ return seconds(t.count() * Duration::seconds_per_tick / seconds::seconds_per_tick);
}
public:
@@ -802,21 +802,21 @@
seconds
from(const nanoseconds& t)
{
- return seconds(t.get_count() / 1000000000LL);
+ return seconds(t.count() / 1000000000LL);
}
static
seconds
from(const microseconds& t)
{
- return seconds(t.get_count() / 1000000LL);
+ return seconds(t.count() / 1000000LL);
}
static
seconds
from(const milliseconds& t)
{
- return seconds(t.get_count() / 1000LL);
+ return seconds(t.count() / 1000LL);
}
static
@@ -830,14 +830,14 @@
seconds
from(const minutes& t)
{
- return seconds(t.get_count() * 60LL);
+ return seconds(t.count() * 60LL);
}
static
seconds
from(const hours& t)
{
- return seconds(t.get_count() * 3600LL);
+ return seconds(t.count() * 3600LL);
}
};
@@ -848,14 +848,14 @@
static minutes
__from(const Duration& t, true_type)
{
- return minutes(t.get_count() / minutes::seconds_per_tick / Duration::ticks_per_second);
+ return minutes(t.count() / minutes::seconds_per_tick / Duration::ticks_per_second);
}
template <class Duration>
static minutes
__from(const Duration& t, false_type)
{
- return minutes(t.get_count() * Duration::seconds_per_tick / minutes::seconds_per_tick);
+ return minutes(t.count() * Duration::seconds_per_tick / minutes::seconds_per_tick);
}
public:
@@ -871,28 +871,28 @@
minutes
from(const nanoseconds& t)
{
- return minutes(t.get_count() / 60000000000LL);
+ return minutes(t.count() / 60000000000LL);
}
static
minutes
from(const microseconds& t)
{
- return minutes(t.get_count() / 60000000L);
+ return minutes(t.count() / 60000000L);
}
static
minutes
from(const milliseconds& t)
{
- return minutes(t.get_count() / 60000L);
+ return minutes(t.count() / 60000L);
}
static
minutes
from(const seconds& t)
{
- return minutes(t.get_count() / 60L);
+ return minutes(t.count() / 60L);
}
static
@@ -906,7 +906,7 @@
minutes
from(const hours& t)
{
- return minutes(t.get_count() * 60L);
+ return minutes(t.count() * 60L);
}
};
@@ -917,14 +917,14 @@
static hours
__from(const Duration& t, true_type)
{
- return hours(t.get_count() / hours::seconds_per_tick / Duration::ticks_per_second);
+ return hours(t.count() / hours::seconds_per_tick / Duration::ticks_per_second);
}
template <class Duration>
static hours
__from(const Duration& t, false_type)
{
- return hours(t.get_count() * Duration::seconds_per_tick / hours::seconds_per_tick);
+ return hours(t.count() * Duration::seconds_per_tick / hours::seconds_per_tick);
}
public:
@@ -940,35 +940,35 @@
hours
from(const nanoseconds& t)
{
- return hours(t.get_count() / 3600000000000LL);
+ return hours(t.count() / 3600000000000LL);
}
static
hours
from(const microseconds& t)
{
- return hours(t.get_count() / 3600000000LL);
+ return hours(t.count() / 3600000000LL);
}
static
hours
from(const milliseconds& t)
{
- return hours(t.get_count() / 3600000L);
+ return hours(t.count() / 3600000L);
}
static
hours
from(const seconds& t)
{
- return hours(t.get_count() / 3600L);
+ return hours(t.count() / 3600L);
}
static
hours
from(const minutes& t)
{
- return hours(t.get_count() / 60L);
+ return hours(t.count() / 60L);
}
static
@@ -1011,7 +1011,7 @@
bool
__duration_eq(const LhsDuration& lhs, const RhsDuration& rhs, true_type)
{
- return lhs.get_count() == __make<LhsDuration>::from(rhs).get_count();
+ return lhs.count() == __make<LhsDuration>::from(rhs).count();
}
template <class LhsDuration, class RhsDuration>
@@ -1019,7 +1019,7 @@
bool
__duration_eq(const LhsDuration& lhs, const RhsDuration& rhs, false_type)
{
- return __make<RhsDuration>::from(lhs).get_count() == rhs.get_count();
+ return __make<RhsDuration>::from(lhs).count() == rhs.count();
}
template <class LhsDuration, class RhsDuration>
@@ -1057,7 +1057,7 @@
bool
__duration_lt(const LhsDuration& lhs, const RhsDuration& rhs, true_type)
{
- return lhs.get_count() < __make<LhsDuration>::from(rhs).get_count();
+ return lhs.count() < __make<LhsDuration>::from(rhs).count();
}
template <class LhsDuration, class RhsDuration>
@@ -1065,7 +1065,7 @@
bool
__duration_lt(const LhsDuration& lhs, const RhsDuration& rhs, false_type)
{
- return __make<RhsDuration>::from(lhs).get_count() < rhs.get_count();
+ return __make<RhsDuration>::from(lhs).count() < rhs.count();
}
template <class LhsDuration, class RhsDuration>
@@ -1129,63 +1129,63 @@
template<typename RhsDuration>
inline
nanoseconds& nanoseconds::operator-=(const RhsDuration& d)
- {ns_ -= __make<nanoseconds>::from(d).get_count(); return *this;}
+ {ns_ -= __make<nanoseconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
nanoseconds& nanoseconds::operator+=(const RhsDuration& d)
- {ns_ += __make<nanoseconds>::from(d).get_count(); return *this;}
+ {ns_ += __make<nanoseconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
microseconds& microseconds::operator-=(const RhsDuration& d)
- {us_ -= __make<microseconds>::from(d).get_count(); return *this;}
+ {us_ -= __make<microseconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
microseconds& microseconds::operator+=(const RhsDuration& d)
- {us_ += __make<microseconds>::from(d).get_count(); return *this;}
+ {us_ += __make<microseconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
milliseconds& milliseconds::operator-=(const RhsDuration& d)
- {ms_ -= __make<milliseconds>::from(d).get_count(); return *this;}
+ {ms_ -= __make<milliseconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
milliseconds& milliseconds::operator+=(const RhsDuration& d)
- {ms_ += __make<milliseconds>::from(d).get_count(); return *this;}
+ {ms_ += __make<milliseconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
seconds& seconds::operator-=(const RhsDuration& d)
- {s_ -= __make<seconds>::from(d).get_count(); return *this;}
+ {s_ -= __make<seconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
seconds& seconds::operator+=(const RhsDuration& d)
- {s_ += __make<seconds>::from(d).get_count(); return *this;}
+ {s_ += __make<seconds>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
minutes& minutes::operator-=(const RhsDuration& d)
- {mn_ -= __make<minutes>::from(d).get_count(); return *this;}
+ {mn_ -= __make<minutes>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
minutes& minutes::operator+=(const RhsDuration& d)
- {mn_ += __make<minutes>::from(d).get_count(); return *this;}
+ {mn_ += __make<minutes>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
hours& hours::operator-=(const RhsDuration& d)
- {hr_ -= __make<hours>::from(d).get_count(); return *this;}
+ {hr_ -= __make<hours>::from(d).count(); return *this;}
template<typename RhsDuration>
inline
hours& hours::operator+=(const RhsDuration& d)
- {hr_ += __make<hours>::from(d).get_count(); return *this;}
+ {hr_ += __make<hours>::from(d).count(); return *this;}
template <class LhsDuration, class RhsDuration, bool = __compare_resolution<LhsDuration, RhsDuration>::value>
struct __compute_promotion
@@ -1342,7 +1342,7 @@
system_time() : ns_(0) {}
system_time(time_t secs, nanoseconds ns)
- : ns_(secs * 1000000000LL + ns.get_count()) {}
+ : ns_(secs * 1000000000LL + ns.count()) {}
// ~system_time() = default;
@@ -1369,13 +1369,13 @@
system_time operator+(const Duration& td) const {system_time t(*this); t += td; return t;}
template<typename Duration>
- system_time& operator+=(const Duration& td) {ns_ += __make<nanoseconds>::from(td).get_count(); return *this;}
+ system_time& operator+=(const Duration& td) {ns_ += __make<nanoseconds>::from(td).count(); return *this;}
template<typename Duration>
system_time operator-(const Duration& td) const {system_time t(*this); t -= td; return t;}
template<typename Duration>
- system_time& operator-=(const Duration& td) {ns_ -= __make<nanoseconds>::from(td).get_count(); return *this;}
+ system_time& operator-=(const Duration& td) {ns_ -= __make<nanoseconds>::from(td).count(); return *this;}
};
Modified: sandbox/committee/LWG/ref_impl/thread
==============================================================================
--- sandbox/committee/LWG/ref_impl/thread (original)
+++ sandbox/committee/LWG/ref_impl/thread 2007-12-06 11:16:12 EST (Thu, 06 Dec 2007)
@@ -76,11 +76,11 @@
} // std
*/
+#include <ostream>
#include <pthread.h>
#include <mutex_base>
#include <condition_variable>
#include <functional>
-#include <ostream>
#include <exception>
namespace std
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