|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59625 - sandbox/chrono/boost/chrono
From: vicente.botet_at_[hidden]
Date: 2010-02-10 16:30:48
Author: viboes
Date: 2010-02-10 16:30:48 EST (Wed, 10 Feb 2010)
New Revision: 59625
URL: http://svn.boost.org/trac/boost/changeset/59625
Log:
Boost.Chrono: Version 0.4.0,
* Cleanup
Text files modified:
sandbox/chrono/boost/chrono/chrono.hpp | 40 ++++++++++++++++++++--------------------
sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp | 6 +++---
sandbox/chrono/boost/chrono/stopwatch_formatter.hpp | 6 +-----
sandbox/chrono/boost/chrono/t24_hours_formatter.hpp | 2 +-
sandbox/chrono/boost/chrono/time_formatter.hpp | 2 +-
5 files changed, 26 insertions(+), 30 deletions(-)
Modified: sandbox/chrono/boost/chrono/chrono.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/chrono.hpp (original)
+++ sandbox/chrono/boost/chrono/chrono.hpp 2010-02-10 16:30:48 EST (Wed, 10 Feb 2010)
@@ -129,10 +129,10 @@
template <class Duration, class Rep2,
bool = (
- boost::is_convertible<typename Duration::rep,
- typename common_type<typename Duration::rep, Rep2>::type>::value
- && boost::is_convertible<Rep2,
- typename common_type<typename Duration::rep, Rep2>::type>::value
+ (boost::is_convertible<typename Duration::rep,
+ typename common_type<typename Duration::rep, Rep2>::type>::value)
+ && (boost::is_convertible<Rep2,
+ typename common_type<typename Duration::rep, Rep2>::type>::value)
)
>
struct duration_divide_imp
@@ -159,10 +159,10 @@
template <class Rep, class Duration,
bool = (
- boost::is_convertible<typename Duration::rep,
- typename common_type<typename Duration::rep, Rep>::type>::value
- && boost::is_convertible<Rep,
- typename common_type<typename Duration::rep, Rep>::type>::value
+ (boost::is_convertible<typename Duration::rep,
+ typename common_type<typename Duration::rep, Rep>::type>::value)
+ && (boost::is_convertible<Rep,
+ typename common_type<typename Duration::rep, Rep>::type>::value)
)
>
struct duration_divide_imp2
@@ -545,8 +545,8 @@
BOOST_CHRONO_CONSTEXPR explicit duration(const Rep2& r,
typename boost::enable_if_c
<
- ( boost::is_convertible<Rep2, rep>::value
- && (treat_as_floating_point<rep>::value
+ ( (boost::is_convertible<Rep2, rep>::value)
+ && ((treat_as_floating_point<rep>::value)
|| ( !treat_as_floating_point<rep>::value
&& !treat_as_floating_point<Rep2>::value)
)
@@ -566,9 +566,9 @@
BOOST_CHRONO_CONSTEXPR duration(const duration<Rep2, Period2>& d,
typename boost::enable_if_c
<
- ( treat_as_floating_point<rep>::value
- || ( ratio_divide<Period2, period>::type::den == 1
- && !treat_as_floating_point<Rep2>::value)
+ ( (treat_as_floating_point<rep>::value)
+ || ( (ratio_divide<Period2, period>::type::den == 1)
+ && (!treat_as_floating_point<Rep2>::value))
)
>::type* = 0)
#ifdef __GNUC__
@@ -645,8 +645,8 @@
inline
typename boost::enable_if_c
<
- ( boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>::value
- && boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>::value
+ ( (boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>::value)
+ && (boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>::value)
),
duration<typename common_type<Rep1, Rep2>::type, Period>
>::type
@@ -662,8 +662,8 @@
inline
typename boost::enable_if_c
<
- ( boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>::value
- && boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>::value
+ ( (boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>::value)
+ && (boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>::value)
),
duration<typename common_type<Rep1, Rep2>::type, Period>
>::type
@@ -1105,9 +1105,9 @@
BOOST_CHRONO_CONSTEXPR duration<Rep, Period>::duration(const duration<Rep2, Period2>& d,
typename boost::enable_if_c
<
- ( treat_as_floating_point<rep>::value
- || ( ratio_divide<Period2, period>::type::den == 1
- && !treat_as_floating_point<Rep2>::value)
+ ( (treat_as_floating_point<rep>::value)
+ || ( (ratio_divide<Period2, period>::type::den == 1)
+ && (!treat_as_floating_point<Rep2>::value))
)
>::type*)
: rep_(duration_cast<duration>(d).count()) {}
Modified: sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp (original)
+++ sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp 2010-02-10 16:30:48 EST (Wed, 10 Feb 2010)
@@ -31,7 +31,7 @@
#include <boost/config/abi_prefix.hpp> // must be the last #include
-#define BOOST_CHRONO_ACCUMULATOR_FORMAT_DEFAULT "%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p\%\n"
+#define BOOST_CHRONO_ACCUMULATOR_FORMAT_DEFAULT "%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p%\n"
namespace boost { namespace chrono {
@@ -82,7 +82,7 @@
os.precision( places );
for ( ; *format; ++format ) {
- if ( *format != '%' || !*(format+1) || !std::strchr("acflmMps", *(format+1)) ) {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("acflmMps", *(format+1))) ) {
os << *format;
} else {
++format;
@@ -133,7 +133,7 @@
#ifndef BOOST_NO_STD_WSTRING
template <>
struct basic_stopwatch_accumulator_formatter_default_format<wchar_t> {
- static const wchar_t* apply() {return L"%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p\%\n"; }
+ static const wchar_t* apply() {return L"%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p%\n"; }
};
#endif
Modified: sandbox/chrono/boost/chrono/stopwatch_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/stopwatch_formatter.hpp (original)
+++ sandbox/chrono/boost/chrono/stopwatch_formatter.hpp 2010-02-10 16:30:48 EST (Wed, 10 Feb 2010)
@@ -39,10 +39,6 @@
>
class basic_stopwatch_formatter {
public:
- //~ typedef std::string string_type;
- //~ typedef string_type::value_type char_type;
- //~ typedef std::ostream ostream_type;
-
typedef std::basic_string<CharT,Traits,Alloc> string_type;
typedef CharT char_type;
typedef std::basic_ostream<CharT,Traits> ostream_type;
@@ -78,7 +74,7 @@
os.precision( places );
for ( ; *format; ++format ) {
- if ( *format != '%' || !*(format+1) || !std::strchr("d", *(format+1)) ) {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("d", *(format+1))) ) {
os << *format;
} else {
++format;
Modified: sandbox/chrono/boost/chrono/t24_hours_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/t24_hours_formatter.hpp (original)
+++ sandbox/chrono/boost/chrono/t24_hours_formatter.hpp 2010-02-10 16:30:48 EST (Wed, 10 Feb 2010)
@@ -75,7 +75,7 @@
t24_hours dt(d);
for ( ; *format; ++format ) {
- if ( *format != '%' || !*(format+1) || !std::strchr("dhmsn", *(format+1)) ) {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("dhmsn", *(format+1))) ) {
os << *format;
} else {
++format;
Modified: sandbox/chrono/boost/chrono/time_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/time_formatter.hpp (original)
+++ sandbox/chrono/boost/chrono/time_formatter.hpp 2010-02-10 16:30:48 EST (Wed, 10 Feb 2010)
@@ -88,7 +88,7 @@
for ( ; *format; ++format )
{
- if ( *format != '%' || !*(format+1) || !std::strchr("rcpus", *(format+1)) )
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("rcpus", *(format+1))) )
os << *format;
else
{
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