|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75492 - in trunk: boost/chrono/io boost/chrono/io/utility boost/chrono/stopwatches/formatters boost/chrono/stopwatches/reporters libs/chrono/doc libs/chrono/test/io
From: vicente.botet_at_[hidden]
Date: 2011-11-14 19:21:51
Author: viboes
Date: 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
New Revision: 75492
URL: http://svn.boost.org/trac/boost/changeset/75492
Log:
Chrono: minor renaming changes
Text files modified:
trunk/boost/chrono/io/duration_io.hpp | 7
trunk/boost/chrono/io/ios_base_state.hpp | 41 ++
trunk/boost/chrono/io/time_point_io.hpp | 6
trunk/boost/chrono/io/utility/ios_base_state_ptr.hpp | 34 +-
trunk/boost/chrono/io/utility/manip_base.hpp | 7
trunk/boost/chrono/stopwatches/formatters/accumulator_set_formatter.hpp | 1
trunk/boost/chrono/stopwatches/formatters/elapsed_formatter.hpp | 3
trunk/boost/chrono/stopwatches/formatters/times_formatter.hpp | 3
trunk/boost/chrono/stopwatches/reporters/system_default_formatter.hpp | 2
trunk/libs/chrono/doc/chrono.qbk | 497 +++++++++++++++++++++++++--------------
trunk/libs/chrono/test/io/duration_output.cpp | 2
11 files changed, 373 insertions(+), 230 deletions(-)
Modified: trunk/boost/chrono/io/duration_io.hpp
==============================================================================
--- trunk/boost/chrono/io/duration_io.hpp (original)
+++ trunk/boost/chrono/io/duration_io.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -46,9 +46,7 @@
/**
* Change the duration_style ios state;
*/
- template <typename out_stream>
- void operator()(out_stream &ios) const
- //void operator()(std::ios_base &ios) const
+ void operator()(std::ios_base &ios) const
{
set_duration_style(ios, style_);
@@ -60,12 +58,11 @@
*
* See Boost.IO i/o state savers for a motivating compression.
*/
- template <typename CharT = char, typename Traits = std::char_traits<CharT> >
struct duration_style_io_saver
{
//! the type of the state to restore
- typedef std::basic_ostream<CharT, Traits> state_type;
+ typedef std::ios_base state_type;
//! the type of aspect to save
typedef duration_style::type aspect_type;
Modified: trunk/boost/chrono/io/ios_base_state.hpp
==============================================================================
--- trunk/boost/chrono/io/ios_base_state.hpp (original)
+++ trunk/boost/chrono/io/ios_base_state.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -1,4 +1,4 @@
-// boost/chrono/io/ios_base_state.hpp
+// boost/chrono/io/ios_state_not_null_ptr.hpp
//
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
@@ -22,9 +22,9 @@
namespace chrono
{
- class fmt_masks : ios_base_flags<fmt_masks>
+ class fmt_masks : public ios_flags<fmt_masks>
{
- typedef ios_base_flags<fmt_masks> base_type;
+ typedef ios_flags<fmt_masks> base_type;
public:
fmt_masks(std::ios_base& ios): base_type(ios) {}
@@ -62,7 +62,7 @@
namespace detail
{
namespace /**/ {
- xalloc_key_initializer_t<ios_base_flags<fmt_masks> > fmt_masks_xalloc_key_initializer;
+ xalloc_key_initializer_t<ios_flags<fmt_masks> > fmt_masks_xalloc_key_initializer;
} // namespace
} // namespace detail
@@ -74,6 +74,16 @@
{
fmt_masks(ios).set_duration_style(style);
}
+ inline std::ios_base& symbol_format(std::ios_base& ios)
+ {
+ fmt_masks(ios).setf(fmt_masks::uses_symbol);
+ return ios;
+ }
+ inline std::ios_base& name_format(std::ios_base& ios)
+ {
+ fmt_masks(ios).unsetf(fmt_masks::uses_symbol);
+ return ios;
+ }
inline timezone_type get_timezone(std::ios_base & ios)
{
@@ -83,6 +93,17 @@
{
fmt_masks(ios).set_timezone(tz);
}
+ inline std::ios_base& local_timezone(std::ios_base& ios)
+ {
+ fmt_masks(ios).setf(fmt_masks::uses_local);
+ return ios;
+ }
+
+ inline std::ios_base& utc_timezone(std::ios_base& ios)
+ {
+ fmt_masks(ios).unsetf(fmt_masks::uses_local);
+ return ios;
+ }
namespace detail
{
@@ -105,11 +126,11 @@
namespace detail
{
namespace /**/ {
- xalloc_key_initializer_t<ios_base_state<detail::ios_base_data_aux<char> > > ios_base_data_aux_xalloc_key_initializer;
- xalloc_key_initializer_t<ios_base_state<detail::ios_base_data_aux<wchar_t> > > wios_base_data_aux_xalloc_key_initializer;
+ xalloc_key_initializer_t<ios_state_not_null_ptr<detail::ios_base_data_aux<char> > > ios_base_data_aux_xalloc_key_initializer;
+ xalloc_key_initializer_t<ios_state_not_null_ptr<detail::ios_base_data_aux<wchar_t> > > wios_base_data_aux_xalloc_key_initializer;
#if BOOST_CHRONO_HAS_UNICODE_SUPPORT
- xalloc_key_initializer_t<ios_base_state<detail::ios_base_data_aux<char16_t> > > u16ios_base_data_aux_xalloc_key_initializer;
- xalloc_key_initializer_t<ios_base_state<detail::ios_base_data_aux<char32_t> > > u32ios_base_data_aux_xalloc_key_initializer;
+ xalloc_key_initializer_t<ios_state_not_null_ptr<detail::ios_base_data_aux<char16_t> > > u16ios_base_data_aux_xalloc_key_initializer;
+ xalloc_key_initializer_t<ios_state_not_null_ptr<detail::ios_base_data_aux<char32_t> > > u32ios_base_data_aux_xalloc_key_initializer;
#endif
} // namespace
} // namespace detail
@@ -117,14 +138,14 @@
template<typename CharT>
static inline std::basic_string<CharT> get_time_fmt(std::ios_base & ios)
{
- ios_base_state<detail::ios_base_data_aux<CharT> > ptr(ios);
+ ios_state_not_null_ptr<detail::ios_base_data_aux<CharT> > ptr(ios);
return ptr->time_fmt;
}
template<typename CharT>
static inline void set_time_fmt(std::ios_base& ios, std::basic_string<
CharT> const& fmt)
{
- ios_base_state<detail::ios_base_data_aux<CharT> > ptr(ios);
+ ios_state_not_null_ptr<detail::ios_base_data_aux<CharT> > ptr(ios);
ptr->time_fmt = fmt;
}
Modified: trunk/boost/chrono/io/time_point_io.hpp
==============================================================================
--- trunk/boost/chrono/io/time_point_io.hpp (original)
+++ trunk/boost/chrono/io/time_point_io.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -49,7 +49,6 @@
/**
* Change the timezone_type and time format ios state;
*/
- //template <typename out_stream>
void operator()(std::ios_base &ios) const
{
set_time_fmt<CharT> (ios, fmt_);
@@ -72,8 +71,6 @@
/**
* Change the timezone_type and time format ios state;
*/
- //template <typename out_stream>
- //void operator()(out_stream &ios) const
void operator()(std::ios_base &ios) const
{
//set_time_fmt<typename out_stream::char_type>(ios, "");
@@ -162,12 +159,11 @@
*
* See Boost.IO i/o state savers for a motivating compression.
*/
- template <typename CharT = char, typename Traits = std::char_traits<CharT> >
struct timezone_io_saver
{
//! the type of the state to restore
- typedef std::basic_ostream<CharT, Traits> state_type;
+ typedef std::ios_base state_type;
//! the type of aspect to save
typedef timezone_type aspect_type;
Modified: trunk/boost/chrono/io/utility/ios_base_state_ptr.hpp
==============================================================================
--- trunk/boost/chrono/io/utility/ios_base_state_ptr.hpp (original)
+++ trunk/boost/chrono/io/utility/ios_base_state_ptr.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -55,10 +55,10 @@
/**
- * @c ios_base_state_ptr is a smart pointer to a ios_base specific state.
+ * @c ios_state_ptr is a smart pointer to a ios_base specific state.
*/
template<typename T>
- class ios_base_state_ptr
+ class ios_state_ptr
{
public:
/**
@@ -68,13 +68,13 @@
/**
* Explicit constructor.
* @param ios the ios
- * @Effects Constructs a @c ios_base_state_ptr by storing the associated @c ios.
+ * @Effects Constructs a @c ios_state_ptr by storing the associated @c ios.
*/
- explicit ios_base_state_ptr(std::ios_base& ios) :
+ explicit ios_state_ptr(std::ios_base& ios) :
ios_(ios)
{
}
- ~ios_base_state_ptr()
+ ~ios_state_ptr()
{
}
@@ -222,7 +222,7 @@
static inline int index()
{
- return detail::xalloc_key_holder<ios_base_state_ptr<T> >::value;
+ return detail::xalloc_key_holder<ios_state_ptr<T> >::value;
}
static inline void register_once(int indx, std::ios_base& ios)
@@ -241,24 +241,24 @@
};
/**
- * @c ios_base_state is a non null variant of @c ios_base_state_ptr.
+ * @c ios_state_not_null_ptr is a non null variant of @c ios_state_ptr.
* @tparm T
* @Requires Must be DefaultConstructible and HeapAllocatable
*/
template<typename T>
- class ios_base_state : public ios_base_state_ptr<T>
+ class ios_state_not_null_ptr : public ios_state_ptr<T>
{
- typedef ios_base_state_ptr<T> base_type;
+ typedef ios_state_ptr<T> base_type;
public:
- explicit ios_base_state(std::ios_base& ios) :
- ios_base_state_ptr<T>(ios)
+ explicit ios_state_not_null_ptr(std::ios_base& ios) :
+ ios_state_ptr<T>(ios)
{
if (this->get()==0)
{
this->base_type::reset(new T());
}
}
- ~ios_base_state()
+ ~ios_state_not_null_ptr()
{
}
@@ -277,15 +277,15 @@
*
*/
template<typename Base>
- class ios_base_flags
+ class ios_flags
{
public:
- explicit ios_base_flags(std::ios_base& ios) :
+ explicit ios_flags(std::ios_base& ios) :
ios_(ios)
{
}
- //ios_base_state_ptr(std::ios_base ios, void (*cleanup_function)(T*));
- ~ios_base_flags()
+ //ios_state_ptr(std::ios_base ios, void (*cleanup_function)(T*));
+ ~ios_flags()
{
}
@@ -339,7 +339,7 @@
}
static inline int index()
{
- return detail::xalloc_key_holder<ios_base_flags<Base> >::value;
+ return detail::xalloc_key_holder<ios_flags<Base> >::value;
}
std::ios_base& ios_;
Modified: trunk/boost/chrono/io/utility/manip_base.hpp
==============================================================================
--- trunk/boost/chrono/io/utility/manip_base.hpp (original)
+++ trunk/boost/chrono/io/utility/manip_base.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -10,8 +10,7 @@
#ifndef BOOST_CHRONO_UTILITY_MANIP_BASE_PTR_HPP
#define BOOST_CHRONO_UTILITY_MANIP_BASE_PTR_HPP
-#include <locale>
-#include <boost/assert.hpp>
+#include <ios>
/**
*
@@ -59,8 +58,8 @@
* @param ios the io stream or ios_base.
* @Effects calls to the manipulator final functor.
*/
- template <typename out_stream>
- void operator()(out_stream &ios) const
+ //template <typename out_stream>
+ void operator()(std::ios_base &ios) const
{
(*static_cast<const Final *> (this))(ios);
}
Modified: trunk/boost/chrono/stopwatches/formatters/accumulator_set_formatter.hpp
==============================================================================
--- trunk/boost/chrono/stopwatches/formatters/accumulator_set_formatter.hpp (original)
+++ trunk/boost/chrono/stopwatches/formatters/accumulator_set_formatter.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -90,6 +90,7 @@
typedef typename Stopwatch::duration duration_t;
+ duration_style_io_saver dsios(this->os_);
this->os_
<< static_cast<format_type&> (*this)
% boost::accumulators::count(acc)
Modified: trunk/boost/chrono/stopwatches/formatters/elapsed_formatter.hpp
==============================================================================
--- trunk/boost/chrono/stopwatches/formatters/elapsed_formatter.hpp (original)
+++ trunk/boost/chrono/stopwatches/formatters/elapsed_formatter.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -1,4 +1,4 @@
-// boost/chrono/stopwatches/elapsed_formatter.hpp ------------------------------------------------------------//
+// boost/chrono/stopwatches/formatters/elapsed_formatter.hpp ------------------------------------------------------------//
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
@@ -80,6 +80,7 @@
if (d < duration_t::zero())
return;
+ duration_style_io_saver dsios(this->os_);
this->os_ << static_cast<format_type&>(*this)
% io::group(std::fixed, std::setprecision(this->precision_), duration_fmt(this->duration_style_), boost::chrono::duration<
double, Ratio>(d))
Modified: trunk/boost/chrono/stopwatches/formatters/times_formatter.hpp
==============================================================================
--- trunk/boost/chrono/stopwatches/formatters/times_formatter.hpp (original)
+++ trunk/boost/chrono/stopwatches/formatters/times_formatter.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -1,4 +1,4 @@
-// boost/chrono/stopwatches/stopwatch_formatter.hpp ------------------------------------------------------------//
+// boost/chrono/stopwatches/formatters/times_formatter.hpp ------------------------------------------------------------//
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
@@ -85,6 +85,7 @@
else
p=0;
+ duration_style_io_saver dsios(this->os_);
this->os_ << static_cast<format_type&>(*this)
% io::group(std::fixed, std::setprecision(this->precision_), duration_fmt(this->duration_style_), boost::chrono::duration<double, Ratio>(nanoseconds(times.real)))
% io::group(std::fixed, std::setprecision(this->precision_), duration_fmt(this->duration_style_), boost::chrono::duration<double, Ratio>(nanoseconds(times.user)))
Modified: trunk/boost/chrono/stopwatches/reporters/system_default_formatter.hpp
==============================================================================
--- trunk/boost/chrono/stopwatches/reporters/system_default_formatter.hpp (original)
+++ trunk/boost/chrono/stopwatches/reporters/system_default_formatter.hpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -1,4 +1,4 @@
-// boost/chrono/stopwatches/stopwatch_reporter.hpp
+// boost/chrono/stopwatches/reporters/system_default_formatter.hpp
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or
Modified: trunk/libs/chrono/doc/chrono.qbk
==============================================================================
--- trunk/libs/chrono/doc/chrono.qbk (original)
+++ trunk/libs/chrono/doc/chrono.qbk 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -9,7 +9,7 @@
[library Boost.Chrono
[quickbook 1.5]
- [version 1.3.0]
+ [version 2.0.0]
[authors [Hinnant, Howard]]
[authors [Dawes, Beman]]
[authors [Botet Escriba, Vicente J.]]
@@ -324,8 +324,8 @@
[def __BasicStopwatch [link chrono.reference.stopwatches.stopwatch_req `BasicStopwatch`]]
[def __basic_stopwatch_concept [link chrono.reference.stopwatches.stopwatch_req `BasicStopwatch`]]
-[def __basic_stopwatch [link chrono.reference.stopwatches.stopwatch_hpp.simple_stopwatch `basic_stopwatch`]]
-[def __basic_stopclock [link chrono.reference.stopwatches.stopwatch_hpp.simple_stopwatch `basic_stopclock`]]
+[def __laps_stopwatch [link chrono.reference.stopwatches.stopwatch_hpp.simple_stopwatch `laps_stopwatch`]]
+[def __laps_stopclock [link chrono.reference.stopwatches.stopwatch_hpp.simple_stopwatch `basic_stopclock`]]
[def __SuspendableStopwatch [link chrono.reference.stopwatches.suspendable_stopwatch_req `SuspendableStopwatch`]]
[def __suspendable_stopwatch_concept [link chrono.reference.stopwatches.suspendable_stopwatch_req `SuspendableStopwatch`]]
@@ -498,16 +498,16 @@
* __BasicStopwatch concept.
* __SuspendableStopwatch concept.
* __simple_stopwatch, model of __SimpleStopwatch capturing elapsed __Clock times.
- * __basic_stopwatch, model of __BasicStopwatch allowing in addition to start and stop the capture of elapsed __Clock times.
+ * __laps_stopwatch, model of __BasicStopwatch allowing in addition to start and stop the capture of elapsed __Clock times.
* __suspendable_stopwatch, model of __SuspendableStopwatch allowing in addition to suspend and resume the capture of elapsed __Clock times.
-__basic_stopwatch and __suspendable_stopwatch have LapsCollector template parameter that allows to store information of the samples defined by a cycle start-stop.
+__laps_stopwatch and __suspendable_stopwatch have LapsCollector template parameter that allows to store information of the samples defined by a cycle start-stop.
* Stopclocks: a complete time reporting package that can be invoked in a single line of code.
* __stopwatch_reporter`<__Stopwatch,__Formatter>`, convenient reporting to an output stream (including wide char streams) of the elapsed time of models of __Stopwatch results.
* Some basic __Formatters.
* `__simple_stopclock<__Clock>` shortcut of `__stopwatch_reporter<__simple_stopwatch<__Clock>>`
- * `__basic_stopclock<__Clock>` shortcut of `__stopwatch_reporter<__basic_stopwatch<__Clock>>`
+ * `__basic_stopclock<__Clock>` shortcut of `__stopwatch_reporter<__laps_stopwatch<__Clock>>`
* `__suspendable_stopclock<__Clock>` shortcut of `__stopwatch_reporter<__suspendable_stopwatch<__Clock>>`
@@ -1217,11 +1217,21 @@
[section:duration_io duration]
-Any __duration can be streamed out to a `basic_ostream`. The run-time value of the __duration is formatted according to the rules and current format settings for __duration`::rep`. This is followed by a single space and then the compile-time unit name of the __duration. This unit name is built on the string returned from `ratio_string<>` and the data used to construct the __duration_punct which was inserted into the stream's locale. If a __duration_punct has not been inserted into the stream's locale, a default constructed __duration_punct will be added to the stream's locale.
+Any __duration can be streamed out to a `basic_ostream`. The run-time value of the __duration is formatted according to the rules and current format settings for __duration`::rep` get_duration_style and the durationpunct facet.
-__duration unit names come in two varieties: long(prefix) and short(symbol). The default constructed __duration_punct provides names in the long(prefix) format. These names are English descriptions. Other languages are supported by constructing a __duration_punct with the proper spellings for "hours", "minutes" and "seconds", and their abbreviations (for the short format). The short or long format can be easily chosen by streaming a `duration_short()` or `duration_long()` manipulator respectively or using the parameterized manimulator `duration_fmt(duration_style::prefix)` or `duration_fmt(duration_style::symbol)`.
+the format is either
+
+<value> <unit>
+<unit> <value>
+
+[warning Need to be changed
+This is followed by a single space and then the compile-time unit name of the __duration. This unit name is built on the string returned from `ratio_string<>` and the data used to construct the __duration_punct which was inserted into the stream's locale. If a __duration_punct has not been inserted into the stream's locale, a default constructed __duration_punct will be added to the stream's locale.
+
+__duration unit names come in two varieties: long(prefix) and short(symbol). The default constructed __duration_punct provides names in the long(prefix) format. These names are English descriptions. Other languages are supported by constructing a __duration_punct with the proper spellings for "hours", "minutes" and "seconds", and their abbreviations (for the short format). The short or long format can be easily chosen by streaming a `duration_short()` or `duration_long()` manipulator respectively or using the parameterized manimulator `duration_fmt(duration_style::prefix)` or `duration_fmt(duration_style::symbol)`.
+
+]
__example
#include <iostream>
@@ -1269,10 +1279,10 @@
As can be seen, each duration type can be streamed without having to manually stream the compile-time units after the run-time value. And when the compile-time unit is known to be a "common unit", English names are used. For "uncommon units" a unit name is composed from the reduced numerator and denominator of the associated __ratio. Whatever stream/locale settings are set for `duration::rep` are used for the value. Additionally, when the value is 1, singular forms for the units are used.
-Sometimes it is desired to shorten these names by using the SI symbols instead of SI prefixes. This can be accomplished with the use of the duration_short manipulator:
+Sometimes it is desired to shorten these names by using the SI symbols instead of SI prefixes. This can be accomplished with the use of the __duration_symbol manipulator [footnote __duration_short in V1]:
cout << "\nSet cout to use short names:\n";
- cout << boost::chrono::duration_short;
+ cout << boost::chrono::duration_prefix;
cout << "milliseconds(3) + microseconds(10) = "
<< boost::chrono::milliseconds(3) + boost::chrono::microseconds(10) << '\n';
@@ -1307,9 +1317,9 @@
-Parsing a __duration follows rules analogous to the __duration converting constructor. A value and a unit (short or long) are read from the `basic_istream`. If the __duration has an integral representation, then the value parsed must be exactly representable in the target __duration (after conversion to the target __duration units), else `failbit` is set. __durations based on floating-point representations can be parsed using any units that do not cause overflow.
+Parsing a __duration follows rules analogous to the __duration converting constructor. A value and a unit (SI symbol or prefixed) are read from the `basic_istream`. If the __duration has an integral representation, then the value parsed must be exactly representable in the target __duration (after conversion to the target __duration units), else __failbit is set. __durations based on floating-point representations can be parsed using any units that do not cause overflow.
-For example a stream containing "5000 milliseconds" can be parsed into seconds, but if the stream contains "5001 milliseconds", parsing into `seconds` will cause `failbit` to be set.
+For example a stream containing "5000 milliseconds" can be parsed into seconds, but if the stream contains "3001 ms", parsing into `seconds` will cause __failbit to be set.
__example
@@ -1515,7 +1525,18 @@
[endsect]
-[endsect]
+[section Low level I/O]
+[/====================]
+
+The I/O interface described in the preceding I/O sections were at the user level. These services are based on low level services that are useful when writing libraries. The low level services are related to access to the associated ios state and locale facets. The design follows the C++ IOStreams standard design:
+
+The library encapsulate the locale-dependent parsing and formatting of __duration into a new facet class. Let's focus on formatting in this example. The concerned facet class is __duration_put, analogous to time_put, money_put, etc.
+
+The use of this facet is similar to the time_put facet. duration_put provides a put function
+
+[endsect] [/ Low level I/O]
+
+[endsect] [/ I/O]
[section Stopwatches and Stopclocks]
@@ -1554,7 +1575,7 @@
...
std::cout << sw.elapsed() << std::endl;
-using the __stopwatch_reporter`<>` class. THis class provides a run time reporting package that can be invoked in a single line of code to report the usage of a __Clock. For example
+using the __stopwatch_reporter`<>` class. This class provides a run time reporting package that can be invoked in a single line of code to report the usage of a __Clock. For example
using namespace boost::chrono;
@@ -1579,7 +1600,7 @@
We can use even a shorter line using the __stopclock class, which allows to replace
- stopwatch_reporter<basic_stopwatch<> > _;
+ stopwatch_reporter<laps_stopwatch<> > _;
by
@@ -2503,6 +2524,7 @@
#include <boost/chrono/ceil.hpp>
#include <boost/chrono/floor.hpp>
#include <boost/chrono/round.hpp>
+ #include <boost/chrono/stopwatches.hpp>
[endsect]
@@ -3887,12 +3909,12 @@
[/==================================================================]
namespace boost {
- namespace chrono {
+ namespace chrono {
template <class __Clock, class CharT>
struct clock_string;
- }
+ }
}
[section:clock_string Template Class `clock_string<>`]
@@ -3928,89 +3950,41 @@
[section:chrono_io_hpp Header `<boost/chrono/chrono_io.hpp>`]
[/==================================================================]
-This file includes the i/o of the two major components, duration and time_point.
-
- #include <boost/chrono/io/duration_io.hpp>
- #include <boost/chrono/io/time_point_io.hpp>
-
-[endsect] [/section:chrono_io_hpp Header `<boost/chrono/chrono_io.hpp>`]
-
-[/==================================================================]
-[section:duration_io_hpp Header `<boost/chrono/io/duration_io.hpp>`]
-[/==================================================================]
-
+[section:v1 I/O V1]
namespace boost {
namespace chrono {
- // typedefs
- struct __duration_style
- {
- enum type {
- __prefix, __symbol
- };
- };
- typedef duration_style::type duration_style_type;
// facets
template <class CharT>
- class __duration_punct;
+ class __duration_punct; // DEPRECATED since V2
// manipulators
template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
- __duration_short(std::basic_ostream<CharT, Traits>& os); // DEPRECATED
+ __duration_short(std::basic_ostream<CharT, Traits>& os); // DEPRECATED since V2
template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
- __duration_long(std::basic_ostream<CharT, Traits>& os); // DEPRECATED
-
- class __duration_fmt;
-
- template<class CharT, class Traits>
- std::basic_ostream<CharT, Traits>&
- __duration_fmt__op_out(std::basic_ostream<CharT, Traits>& os, duration_fmt d);
-
- template<class CharT, class Traits>
- std::basic_istream<CharT, Traits>&
- __duration_fmt__op_in(std::basic_istream<CharT, Traits>& is, duration_fmt d);
-
- // i/o state savers
-
- template<typename CharT = char, typename Traits = std::char_traits<CharT> >
- struct __duration_style_io_saver;
+ __duration_long(std::basic_ostream<CharT, Traits>& os); // DEPRECATED since V2
// duration I/O
template <class CharT, class Traits, class Rep, class Period>
std::basic_ostream<CharT, Traits>&
- __duration__op_out(std::basic_ostream<CharT, Traits>& os, const __duration<Rep, Period>& d);
+ __v1_duration__op_out(std::basic_ostream<CharT, Traits>& os, const __duration<Rep, Period>& d);
template <class CharT, class Traits, class Rep, class Period>
std::basic_istream<CharT, Traits>&
- __duration__op_in(std::basic_istream<CharT, Traits>& is, __duration<Rep, Period>& d)
+ __v1_duration__op_in(std::basic_istream<CharT, Traits>& is, __duration<Rep, Period>& d)
}
}
-[section:duration_style Scoped enum `duration_style`]
-
- struct duration_style
- {
- enum type {
- prefix, symbol
- };
- };
- typedef duration_style::type duration_style_type;
-
-__duration unit names come in two varieties: prefix and symbol.
-
-[endsect] [/section:duration_style Scoped enum `duration_style`]
-
-
-[section:duration_punct Template Class `duration_punct<>`]
+[section:duration_punct Template Class `duration_punct<>` ]
The __duration unit names can be customized through the facet: __duration_punct.
@@ -4101,109 +4075,117 @@
[endsect] [/section:duration_punct Template Class `duration_punct<>`]
-[section:manipulators I/O Manipulators]
-
-[section:duration_fmt Template Class `duration_fmt`]
+[section:duration_short Non Member Function `duration_short(basic_istream<>&`]
- class duration_fmt
- {
- public:
+The short or long format can be easily chosen by streaming a `duration_short` or `duration_long` manipulator respectively.
- explicit __duration_fmt__c1(__duration_style style) BOOST_CHRONO_NOEXCEPT;
+ template <class CharT, class Traits>
+ std::basic_ostream<CharT, Traits>&
+ duration_short(std::basic_ostream<CharT, Traits>& os);
- #ifndef BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
- explicit
- __duration_fmt__op_duration_style() const BOOST_CHRONO_NOEXCEPT;
- #endif
- __duration_style __duration_fmt__get_duration_style() const BOOST_CHRONO_NOEXCEPT;
- };
+__effects Set the __duration_punct facet to stream __durations and __time_points as abbreviations.
- template<class CharT, class Traits>
- std::basic_ostream<CharT, Traits>&
- __duration_fmt__op_out(std::basic_ostream<CharT, Traits>& os, duration_fmt d);
+__returns os
- template<class CharT, class Traits>
- std::basic_istream<CharT, Traits>&
- __duration_fmt__op_in(std::basic_istream<CharT, Traits>& is, duration_fmt d);
+[endsect]
+[section:duration_long Non Member Function `duration_long(basic_istream<>&`]
+ template <class CharT, class Traits>
+ std::basic_ostream<CharT, Traits>&
+ duration_long(std::basic_ostream<CharT, Traits>& os);
-[section:c1 Constructor `duration_fmt(duration_style_type)`]
- explicit duration_fmt(duration_style_type f) noexcept;
+__effects Set the __duration_punct facet to stream durations and time_points as long text.
-__effects Constructs a __duration_fmt by storing `f`.
+__returns the output stream
-__postcondition `static_cast<duration_style>(*this) == f`.
[endsect]
-[section:op_duration_style Member Function `operator duration_style()`]
- explicit operator duration_style() const noexcept;
- duration_style_type get_duration_style() const noexcept;
-
-__returns: The stored __duration_fmt `f`.
[endsect]
-[section:op_out Member Function `operator <<(basic_ostream<>&, duration_fmt)`]
- template<class CharT, class Traits>
- basic_ostream<CharT, Traits>&
- operator<<(basic_ostream<CharT, Traits>& s, duration_fmt d);
+[section:v2 I/O V2]
-__effects: `s.imbue(locale(s.getloc(), new durationpunct(static_cast<duration_style>(d))))`.
+This file includes the i/o of the two major components, duration and time_point.
-__returns: `s`.
+ #include <boost/chrono/io/duration_style.hpp>
+ #include <boost/chrono/io/timezone.hpp>
+ #include <boost/chrono/io/ios_state.hpp>
+ #include <boost/chrono/io/duration_get.hpp>
+ #include <boost/chrono/io/duration_put.hpp>
+ #include <boost/chrono/io/duration_units.hpp>
+ #include <boost/chrono/io/duration_io.hpp>
+ #include <boost/chrono/io/time_point_get.hpp>
+ #include <boost/chrono/io/time_point_put.hpp>
+ #include <boost/chrono/io/time_point_units.hpp>
+ #include <boost/chrono/io/time_point_io.hpp>
[endsect]
-[section:op_in Member Function `operator >>(basic_istream<>&, duration_fmt)`]
- template<class CharT, class Traits>
- basic_istream<CharT, Traits>&
- operator>>(basic_istream<CharT, Traits>& s, duration_fmt d);
+[endsect] [/section:chrono_io_hpp Header `<boost/chrono/chrono_io.hpp>`]
-__effects: `s.imbue(locale(s.getloc(), new durationpunct(static_cast<duration_style>(d))))`.
+[/==================================================================]
+[section:duration_style_hpp Header `<boost/chrono/io/duration_style.hpp>`]
+[/==================================================================]
-__returns: `s`.
-[endsect]
-[endsect]
+ namespace boost {
+ namespace chrono {
-[section:duration_short Non Member Function `duration_short(basic_istream<>&`]
+ // typedefs
+ struct __duration_style
+ {
+ enum type {
+ __prefix, __symbol
+ };
+ };
+ typedef duration_style::type duration_style_type;
+ }
+ }
+
+[section:duration_style Scoped enum `duration_style`]
-The short or long format can be easily chosen by streaming a `duration_short` or `duration_long` manipulator respectively.
+ struct duration_style
+ {
+ enum type {
+ prefix, symbol
+ };
+ };
+ typedef duration_style::type duration_style_type;
- template <class CharT, class Traits>
- std::basic_ostream<CharT, Traits>&
- duration_short(std::basic_ostream<CharT, Traits>& os);
+__duration unit names come in two varieties: prefix and symbol.
-__effects Set the __duration_punct facet to stream __durations and __time_points as abbreviations.
+[endsect] [/section:duration_style Scoped enum `duration_style`]
-__returns os
+[endsect] [/section:duration_style_hpp Header `<boost/chrono/io/duration_style.hpp>`]
-[endsect]
-[section:duration_long Non Member Function `duration_long(basic_istream<>&`]
+[/==================================================================]
+[section:ios_state_hpp Header `<boost/chrono/io/ios_sate.hpp>`]
+[/==================================================================]
- template <class CharT, class Traits>
- std::basic_ostream<CharT, Traits>&
- duration_long(std::basic_ostream<CharT, Traits>& os);
+ namespace boost {
+ namespace chrono {
+ // i/o state savers
-__effects Set the __duration_punct facet to stream durations and time_points as long text.
-
-__returns the output stream
+ duration_style::type __get_duration_style(std::ios_base & ios);
+ void __set_duration_style(std::ios_base& ios, duration_style::type style);
+ template<typename CharT = char, typename Traits = std::char_traits<CharT> >
+ struct __duration_style_io_saver;
-[endsect]
-[endsect]
+ }
+ }
+
[section:ioss I/O State Savers]
[section:duration_style_io_saver Template Class `duration_style_io_saver`]
// i/o state savers
- template<typename CharT = char, typename Traits = std::char_traits<CharT> >
struct duration_style_io_saver
{
- typedef std::basic_ios<CharT, Traits> state_type;
+ typedef std::ios_base state_type;
typedef __duration_style aspect_type;
explicit __duration_style_io_saver__c1(state_type &s);
@@ -4213,7 +4195,7 @@
};
-The `state_type` is a version of the IOStreams base class template `std::basic_ios<CharT, Traits>`, where `CharT` is a character type and `Traits` is a character traits class. The user would usually place an actual input, output, or combined stream object for the state-type parameter, and not a base class object.
+The `state_type` is a version of the IOStreams base class `std::ios_base`.
[section:c1 Constructor `duration_style_io_saver(state_type&)`]
@@ -4262,6 +4244,135 @@
[endsect]
[endsect]
+[endsect] [/section:ios_state_hpp Header `<boost/chrono/io/ios_sate.hpp>`]
+
+[/==================================================================]
+[section:duration_io_hpp Header `<boost/chrono/io/duration_io.hpp>`]
+[/==================================================================]
+
+ namespace boost {
+ namespace chrono {
+
+ // manipulators
+
+ std::ios_base& __symbol_format(ios_base& ios);
+ std::ios_base& __name_format(ios_base& ios);
+ class __duration_fmt;
+ template<class CharT, class Traits>
+ std::basic_ostream<CharT, Traits>&
+ __duration_fmt__op_out(std::basic_ostream<CharT, Traits>& os, duration_fmt d);
+
+ template<class CharT, class Traits>
+ std::basic_istream<CharT, Traits>&
+ __duration_fmt__op_in(std::basic_istream<CharT, Traits>& is, duration_fmt d);
+
+
+ // duration I/O
+
+ template <class CharT, class Traits, class Rep, class Period>
+ std::basic_ostream<CharT, Traits>&
+ __duration__op_out(std::basic_ostream<CharT, Traits>& os, const __duration<Rep, Period>& d);
+
+ template <class CharT, class Traits, class Rep, class Period>
+ std::basic_istream<CharT, Traits>&
+ __duration__op_in(std::basic_istream<CharT, Traits>& is, __duration<Rep, Period>& d)
+
+ }
+ }
+
+
+[section:manipulators I/O Manipulators]
+
+There is a parameterized manimulator that takes the duration_style as parameter.
+The symbol or name format can be easily chosen by streaming a `symbol_format` or `name_format` manipulators respectively.
+
+[section:duration_fmt Template Class `duration_fmt`]
+
+ class duration_fmt
+ {
+ public:
+
+ explicit __duration_fmt__c1(__duration_style style) BOOST_CHRONO_NOEXCEPT;
+
+ #ifndef BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+ explicit
+ __duration_fmt__op_duration_style() const BOOST_CHRONO_NOEXCEPT;
+ #endif
+ __duration_style __duration_fmt__get_duration_style() const BOOST_CHRONO_NOEXCEPT;
+ };
+
+ template<class CharT, class Traits>
+ std::basic_ostream<CharT, Traits>&
+ __duration_fmt__op_out(std::basic_ostream<CharT, Traits>& os, duration_fmt d);
+
+ template<class CharT, class Traits>
+ std::basic_istream<CharT, Traits>&
+ __duration_fmt__op_in(std::basic_istream<CharT, Traits>& is, duration_fmt d);
+
+
+[section:c1 Constructor `duration_fmt(duration_style_type)`]
+
+ explicit duration_fmt(duration_style_type f) noexcept;
+
+__effects Constructs a __duration_fmt by storing `f`.
+
+__postcondition `static_cast<duration_style>(*this) == f`.
+
+[endsect]
+[section:op_duration_style Member Function `operator duration_style()`]
+
+ explicit operator duration_style() const noexcept;
+ duration_style_type get_duration_style() const noexcept;
+
+__returns: The stored __duration_fmt `f`.
+
+[endsect]
+[section:op_out Member Function `operator <<(basic_ostream<>&, duration_fmt)`]
+
+ template<class CharT, class Traits>
+ basic_ostream<CharT, Traits>&
+ operator<<(basic_ostream<CharT, Traits>& s, duration_fmt d);
+
+__effects: `set_duration_style(s, static_cast<duration_style>(d))))`.
+
+__returns: `s`.
+
+[endsect]
+[section:op_in Member Function `operator >>(basic_istream<>&, duration_fmt)`]
+
+ template<class CharT, class Traits>
+ basic_istream<CharT, Traits>&
+ operator>>(basic_istream<CharT, Traits>& s, duration_fmt d);
+
+__effects: `set_duration_style(s, static_cast<duration_style>(d))))`.
+
+__returns: `s`.
+
+[endsect]
+[endsect]
+
+[section:symbol_format Non Member Function `symbol_format(ios_base&`]
+
+ std::ios_base& __symbol_format(ios_base& ios);
+
+__effects: `set_duration_style(s, duration_style::symbol)`.
+
+__returns `ios`
+
+[endsect]
+[section:name_format Non Member Function `name_format(ios_base&`]
+
+ std::ios_base& __name_format(ios_base& ios);
+
+__effects: `set_duration_style(s, duration_style::prefix)`.
+
+__returns `ios`
+
+
+[endsect]
+[endsect]
+
+
[section:streams I/O Streams Operations]
[section:duration__op_out Member Function `operator <<(basic_ostream<>&, const duration<>& d)`]
@@ -4323,12 +4434,11 @@
[endsect] [/section:duration_io_hpp Header `<boost/chrono/io/duration_io.hpp>`]
[/==================================================================]
-[section:time_point_io_hpp Header `<boost/chrono/io/time_point_io.hpp>`]
+[section:timezone_hpp Header `<boost/chrono/io/timezone.hpp>`]
[/==================================================================]
-
namespace boost {
- namespace chrono {
+ namespace chrono {
struct __timezone
{
@@ -4336,8 +4446,33 @@
__utc, __local
};
};
+ }
+ }
+
+[section:timezone Scoped enum `timezone`]
+
+ struct timezone
+ {
+ enum type {
+ utc, local
+ };
+ };
typedef timezone::type timezone_type;
+
+[endsect] [/section:timezone Scoped enum `timezone`]
+
+
+[endsect] [/section:timezone_hpp Header `<boost/chrono/io/timezone.hpp>`]
+
+[/==================================================================]
+[section:time_point_io_hpp Header `<boost/chrono/io/time_point_io.hpp>`]
+[/==================================================================]
+
+
+ namespace boost {
+ namespace chrono {
+
// facets
template <class CharT>
@@ -4404,18 +4539,6 @@
}
-[section:timezone Scoped enum `timezone`]
-
- struct timezone
- {
- enum type {
- utc, local
- };
- };
- typedef timezone::type timezone_type;
-
-
-[endsect] [/section:timezone Scoped enum `timezone`]
[section:time_punct Template Class `time_punct <>`]
@@ -5309,14 +5432,13 @@
[table SimpleStopwatch Requirements
[[expression] [return type] [operational semantics]]
- [[`S::clock`] [A model of __Clock.] [The clock associated to this Stopwatch.]]
- [[`S::duration`] [`S::clock::duration`] [The __duration type of the `clock`.]]
- [[`S::time_point`] [`S::clock::time_point`] [The __time_point type of the `clock`.]]
- [[`s.elapsed()`] [`S::duration`] [the elapsed time while the SimpleStopwatch was running.]]
- [[`s.reset()`] [] [Resets as if it was constructed again.]]
-
- [[`s.elapsed(ec)`] [`S::duration`] [the elapsed time while the SimpleStopwatch was running.]]
- [[`s.reset(ec)`] [] [Resets as if it was constructed again.]]
+ [[`S::clock`] [A model of __Clock.] [The clock associated to this Stopwatch.]]
+ [[`S::duration`] [`S::clock::duration`] [The __duration type of the `clock`.]]
+ [[`S::time_point`] [`S::clock::time_point`] [The __time_point type of the `clock`.]]
+ [[`s.elapsed()`] [`S::duration`] [the elapsed time while the SimpleStopwatch was running.]]
+ [[`s.reset()`] [-] [Resets as if it was constructed again.]]
+ [[`s.elapsed(ec)`] [`S::duration`] [the elapsed time while the SimpleStopwatch was running.]]
+ [[`s.reset(ec)`] [-] [Resets as if it was constructed again.]]
]
[section:elapsed Member Function `elapsed()`]
@@ -5359,18 +5481,18 @@
In this table `S` denote `Stopwatch` type. `s` is an instance of `S`, `ec` is instance of `system::error_code`.
[table Stopwatch Requirements
- [[expression] [return type] [operational semantics]]
- [[`S::laps_collector `] [ A model of __LapsCollector] [Collects the laps's samples.]]
- [[`S::scoped_run`] [`__stopwatch_runner<S>`] [RAI which `start`/`stop` the `stopwatch`.]]
- [[`S::scoped_stop`] [`__stopwatch_stopper<S>`] [RAI which `stop`/`start` the `stopwatch`.]]
- [[`s.start()`] [] [starts a Stopwatch.]]
- [[`s.restart()`] [] [restarts a Stopwatch.]]
- [[`s.stop()`] [] [stops a Stopwatch.]]
- [[`s.is_running()`] [bool] [true if the Stopwatch is running.]]
- [[`s.lap_collector()`] [`S::laps_collector const&`] [the elapsed time while the Stopwatch was running.]]
- [[`s.start(ec)`] [] [starts a Stopwatch.]]
- [[`s.restart(ec)`] [] [restarts a Stopwatch.]]
- [[`s.stop(ec)`] [] [stops a Stopwatch.]]
+ [[expression] [return type] [operational semantics]]
+ [[`S::laps_collector `] [ A model of __LapsCollector] [Collects the laps's samples.]]
+ [[`S::scoped_run`] [`__stopwatch_runner<S>`] [RAI which `start`/`stop` the `stopwatch`.]]
+ [[`S::scoped_stop`] [`__stopwatch_stopper<S>`] [RAI which `stop`/`start` the `stopwatch`.]]
+ [[`s.start()`] [-] [starts a Stopwatch.]]
+ [[`s.restart()`] [-] [restarts a Stopwatch.]]
+ [[`s.stop()`] [-] [stops a Stopwatch.]]
+ [[`s.is_running()`] [bool] [true if the Stopwatch is running.]]
+ [[`s.lap_collector()`] [`S::laps_collector const&`] [the elapsed time while the Stopwatch was running.]]
+ [[`s.start(ec)`] [-] [starts a Stopwatch.]]
+ [[`s.restart(ec)`] [-] [restarts a Stopwatch.]]
+ [[`s.stop(ec)`] [-] [stops a Stopwatch.]]
]
[section:start Member Function `start()`]
@@ -5452,10 +5574,11 @@
In this table `S` denote `SuspendableStopwatch` type, `s` is an instance of `S`, `ec` is instance of `system::error_code`.
[table Stopwatch Requirements
- [[`S::scoped_resume`] [`__stopwatch_resumer<S>`] [RAI which `resume`/`suspend` the `stopwatch`.]]
- [[`S::scoped_resume`] [`__stopwatch_resumer<S>`] [RAI which `resume`/`suspend` the `stopwatch`.]]
- [[`s.resume()`] [] [resume a Stopwatch.]]
- [[`s.suspend()`] [] [suspends a Stopwatch.]]
+ [[expression] [return type] [operational semantics]]
+ [[`S::scoped_resume`] [`__stopwatch_resumer<S>`] [RAI which `resume`/`suspend` the `stopwatch`.]]
+ [[`S::scoped_resume`] [`__stopwatch_resumer<S>`] [RAI which `resume`/`suspend` the `stopwatch`.]]
+ [[`s.resume()`] [-] [resumes a Stopwatch.]]
+ [[`s.suspend()`] [-] [suspends a Stopwatch.]]
]
@@ -5784,7 +5907,7 @@
[/==================================]
[section:history Appendix: History]
[/==================================]
-[section [*Version 1.3.0, January 1, 2012] ]
+[section [*Version 2.0.0, January 1, 2012] ]
[*New Features:]
@@ -5795,36 +5918,40 @@
[*Deprecated:]
-* chrono I/O: The manipulators duration_short, duration long are depreceated. You should use the parameterized form duration_fmt instead.
-* chrono I/O: The duraction_punc<> facet observers is_short_name, is_long_name are depreceated. You should use is_prefix and is_symbol instead.
-* chrono I/O: The duraction_punc<> facet constructors taking as argument the literals duraction_punc<>::use_long or use short are depreceated. You should use duration_style::prefix and duration_style::symbol instead.
-* chrono I/O: The duraction_punc<> facet constructors taking the long names for seconds, minutes and hours and the associated observers short_name, long_name and name are depreceated.
-Boost.Chrono allows the user to use an interface that could be customized to take care of locale issues. The default behavior been to return the English words.
+* The chrono i/o version included in Boost.Chrono 1.2.0 has been completmly refactored in version 2.0.0
+* chrono I/O: The manipulators __duration_short, __duration_long are depreceated. You should use the parameterized form __duration_fmt or the renamed manipulators __duration_symbol and __duration_prefix instead.
+* chrono I/O: The duraction_punc<> facet is depreceated. You should use the __get_duration_style free function to get the informations and use the duration_units facet for localization purposes.
+
+When BOOST_CHRONO_DONT_PROVIDE_DEPRECATED_IO_V1 is defined the preceding deprecated functions are not available.
+
+[*Fixes:]
+
+* [@http://svn.boost.org/trac/boost/ticket/6092 #6092] Input from non integral durations makes the compiler fail.
+* [@http://svn.boost.org/trac/boost/ticket/6093 #6093] [1/3]second fails as valid duration input.
+* [@http://svn.boost.org/trac/boost/ticket/6113 #6113] duplicate symbol when BOOST_CHRONO_HEADER_ONLY is defined.
-When BOOST_CHRONO_IO_V1_DONT_PROVIDE_DEPRECATED is defined the preceding deprecated functions are not available.
-In addition, the user needs to define the macro BOOST_CHRONO_IO_USES_EXTERNAL_LOCALIZATION to be able to customize the locale interface.
+[/* [@http://svn.boost.org/trac/boost/ticket/6094 #6094] 1 secondALPHA should be an invalid input for a duration.]
-[endsect] [/section [*Version 1.3.0] ]
+[endsect] [/section [*Version 2.0.0] ]
[section [*Version 1.2.0, October 17, 2011] ]
[*New Features:]
* [@http://svn.boost.org/trac/boost/ticket/5979 #5979] Added chrono rounding utilities as defined By Howard Hinnant [@http://home.roadrunner.com/~hinnant/duration_io/chrono_util.html here].
-* [@http://svn.boost.org/trac/boost/ticket/5978 #5978] Add BOOST_CHRONO_HAS_PROCESS_CLOCKS to know if process clocks are available.
+* [@http://svn.boost.org/trac/boost/ticket/5978 #5978] Added BOOST_CHRONO_HAS_PROCESS_CLOCKS to know if process clocks are available.
* [@http://svn.boost.org/trac/boost/ticket/5998 #5998] Make possible to don't provide hybrid error handling.
* [@http://svn.boost.org/trac/boost/ticket/5906 #5906] Take in account the constexpr as defined in the standard.
* [@http://svn.boost.org/trac/boost/ticket/5907 #5907] Take in account noexcept for compilers supporting it.
[*Fixes:]
-* [@http://svn.boost.org/trac/boost/ticket/5669 #5669] Intel compiler failure to compile duration.hpp
* [@http://svn.boost.org/trac/boost/ticket/2114 #2114] Enable visibility support (Boost.Chorno part)
+* [@http://svn.boost.org/trac/boost/ticket/5669 #5669] Intel compiler failure to compile duration.hpp
* [@http://svn.boost.org/trac/boost/ticket/5909 #5909] process_cpu_clock::now() on MAC gives time_points 1/1000 times.
* [@http://svn.boost.org/trac/boost/ticket/5946 #5946] Process real cpu clock returns the system steady clock (windows).
* [@http://svn.boost.org/trac/boost/ticket/5974 #5974] Process real cpu clock should use clock() instead of times() in MAC which is twice faster and have better resolution.
-
[*Cleanup:]
* [@http://svn.boost.org/trac/boost/ticket/5975 #5975] Reduce the combinations of header-only, shared, static link to reduce test time by 50%.
Modified: trunk/libs/chrono/test/io/duration_output.cpp
==============================================================================
--- trunk/libs/chrono/test/io/duration_output.cpp (original)
+++ trunk/libs/chrono/test/io/duration_output.cpp 2011-11-14 19:21:48 EST (Mon, 14 Nov 2011)
@@ -45,7 +45,7 @@
{
std::ostringstream out;
{
- boost::chrono::duration_style_io_saver<> ios(out);
+ boost::chrono::duration_style_io_saver ios(out);
out << boost::chrono::duration_fmt(style) << d;
BOOST_TEST(out.good());
BOOST_TEST(out.str() == str);
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