diff options
Diffstat (limited to 'libs/chrono/doc/chrono.qbk')
-rw-r--r-- | libs/chrono/doc/chrono.qbk | 116 |
1 files changed, 65 insertions, 51 deletions
diff --git a/libs/chrono/doc/chrono.qbk b/libs/chrono/doc/chrono.qbk index 631291843..d78228e4f 100644 --- a/libs/chrono/doc/chrono.qbk +++ b/libs/chrono/doc/chrono.qbk @@ -1,7 +1,7 @@ [/ / Copyright (c) 2008 Howard Hinnant / Copyright (c) 2006, 2008 Beman Dawes - / Copyright (c) 2009-20010 Vicente J. Botet Escriba + / Copyright (c) 2009-2015 Vicente J. Botet Escriba / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,7 +9,7 @@ [library Boost.Chrono [quickbook 1.5] - [version 2.0.4] + [version 2.0.5] [authors [Hinnant, Howard]] [authors [Dawes, Beman]] [authors [Botet Escriba, Vicente J.]] @@ -499,7 +499,7 @@ This textural representation uses [@http://en.wikipedia.org/wiki/SI_prefix#List_ This makes it easy for `boost::milliseconds` to be represented by the text "milliseconds", or a hypothetical meter class to print out "millimeter". The __duration and the __time_point i/o can be customized through the new facets: __duration_units and __time_point_units. -The user can specialize these facets so that the the chrono i/o could be localizable. +The user can specialize these facets so that the chrono i/o could be localizable. However Boost.Chrono doesn't provides a complete locale solution. `system_clock::time_point` I/O is proposed in terms of UTC timepoints, strongly guided by @@ -556,7 +556,7 @@ The simple way is to decompress (or checkout from SVN) the files in your BOOST_R __Boost_Chrono__ can be configured as a header-only library defining __BOOST_CHRONO_HEADER_ONLY. However Boost.Chrono depends on the non header-only library Boost.System, so that you will need to link with boost_system. -Boost.System has un undocumented feature (use of macro BOOST_ERROR_CODE_HEADER_ONLY) to make it header only. +Boost.System has an undocumented feature (use of macro BOOST_ERROR_CODE_HEADER_ONLY) to make it header only. If __BOOST_CHRONO_HEADER_ONLY is not defined you need to compile it and build the library before use, for example using: @@ -1260,7 +1260,7 @@ or [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)`. +__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 manipulator `duration_fmt(duration_style::prefix)` or `duration_fmt(duration_style::symbol)`. ] __example @@ -2178,7 +2178,7 @@ Where: * `d` is the number of `days` * `h` is the number of `hours` * `m` is the number of `minutes` -* `ss.cc` is the number of `seconds` rounded to the nearest hundreth of a second +* `ss.cc` is the number of `seconds` rounded to the nearest hundredth of a second #include <boost/chrono/chrono_io.hpp> #include <ostream> @@ -2298,7 +2298,7 @@ The non-member sleep functions can be emulated as follows: }} -Next is the `boost::thread::timed_mutex` modified fuctions +Next is the `boost::thread::timed_mutex` modified functions namespace boost { struct timed_mutex { @@ -2525,7 +2525,7 @@ Include only the standard files. [section:limitations Limitations and Extensions] -At present, tthere is no know limitation respect to the C++11 standard. +At present, there is no know limitation respect to the C++11 standard. The current implementation provides in addition: @@ -2542,8 +2542,8 @@ The current implementation provides in addition: When `BOOST_NO_STATIC_ASSERT` is defined, the user can select the way static assertions are reported. Define * `BOOST_CHRONO_USES_STATIC_ASSERT`: define it if you want to use Boost.StaticAssert. -* `BOOST_CHRONO_USES_MPL_ASSERT`: define it if you want to use Boost.MPL static asertions. -* `BOOST_CHRONO_USES_ARRAY_ASSERT`: define it if you want to use internal static asertions. +* `BOOST_CHRONO_USES_MPL_ASSERT`: define it if you want to use Boost.MPL static assertions. +* `BOOST_CHRONO_USES_ARRAY_ASSERT`: define it if you want to use internal static assertions. The default behavior is as `BOOST_CHRONO_USES_ARRAY_ASSERT` was defined. @@ -2702,7 +2702,7 @@ This file contains duration specific classes and non-member functions. const duration<Rep2, Period2>& rhs); #ifdef BOOST_CHRONO_EXTENSIONS - // Used to get frecuency of events + // Used to get frequency of events template <class Rep1, class Rep2, class Period> constexpr double __duration__op_div_1( @@ -4076,7 +4076,7 @@ A __time_point is formatted by outputting its internal __duration followed by a std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const duration<Rep, Period>& d); -__effects outputs the __duration as an abrevieated or long text format depending on the state of the __duration_punct facet. +__effects outputs the __duration as an abbreviated or long text format depending on the state of the __duration_punct facet. __returns the output stream @@ -4093,7 +4093,7 @@ __returns the input stream operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<Clock, Duration>& tp); -__effects outputs the __time_point as an abrevieated or long text format depending on the state of the __duration_punct facet. +__effects outputs the __time_point as an abbreviated or long text format depending on the state of the __duration_punct facet. __returns the output stream @@ -4334,25 +4334,23 @@ The `state_type` is a version of the IOStreams base class `std::ios_base`. [section:c1 Constructor `duration_style_io_saver(state_type&)`] -The first constructor takes a stream object and saves a reference to the stream and the current value of a particular stream attribute. +This constructor takes a stream object and saves a reference to the stream and +the current value of a particular stream attribute. explicit duration_style_io_saver(state_type &s); __effects Constructs a __duration_style_io_saver by storing `s`. -__postcondition `static_cast<duration_style>(*this) == f`. - [endsect] -[section:c2 Constructor `duration_style_io_saver(state_type, aspect_type)`] +[section:c2 Constructor `duration_style_io_saver(state_type&, aspect_type)`] -The second constructor works like the first, and uses its second argument to change the stream's attribute to the new aspect_type value given. +This constructor works like the previous one, and in addition +uses its second argument to change the stream's attribute to the new `aspect_type` value given. explicit duration_style_io_saver(state_type &s, aspect_type new_value); -__effects Constructs a __duration_style_io_saver by storing `s`. - -__postcondition `static_cast<duration_style>(*this) == f`. +__effects Constructs a __duration_style_io_saver by storing `s`. Sets the `state_type` `aspect_type` with the value `new_value`. [endsect] @@ -4397,7 +4395,7 @@ The `state_type` is a version of the IOStreams base class template `std::basic_i [section:c1 Constructor `timezone_io_saver(state_type&)`] -The first constructor takes a stream object and saves a reference to the stream and the current value of a particular stream attribute. +This constructor takes a stream object and saves a reference to the stream and the current value of a particular stream attribute. explicit timezone_io_saver(state_type &s); @@ -4405,13 +4403,14 @@ __effects Constructs a __timezone_io_saver by storing `s`. [endsect] -[section:c2 Constructor `timezone_io_saver(state_type, aspect_type)`] +[section:c2 Constructor `timezone_io_saver(state_type&, aspect_type)`] -The second constructor works like the first, and uses its second argument to change the stream's attribute to the new aspect_type value given. +This constructor works like the previous one, and +uses its second argument to change the stream's attribute to the new aspect_type value given. explicit timezone_io_saver(state_type &s, aspect_type new_value); -__effects Constructs a __timezone_io_saver by storing `s`. +__effects Constructs a __timezone_io_saver by storing `s`. Sets the `state_type` `aspect_type` with the value `new_value`. [endsect] @@ -4456,7 +4455,7 @@ The `state_type` is a version of the IOStreams base class template `std::basic_i [section:c1 Constructor `time_fmt_io_saver(state_type&)`] -The first constructor takes a stream object and saves a reference to the stream and the current value of a particular stream attribute. +This constructor takes a stream object and saves a reference to the stream and the current value of a particular stream attribute. explicit time_fmt_io_saver(state_type &s); @@ -4464,13 +4463,14 @@ __effects Constructs a __time_fmt_io_saver by storing `s`. [endsect] -[section:c2 Constructor `time_fmt_io_saver(state_type, aspect_type)`] +[section:c2 Constructor `time_fmt_io_saver(state_type&, aspect_type)`] -The second constructor works like the first, and uses its second argument to change the stream's attribute to the new aspect_type value given. +This constructor works like the previous one, and +uses its second argument to change the stream's attribute to the new aspect_type value given. explicit time_fmt_io_saver(state_type &s, aspect_type new_value); -__effects Constructs a __time_fmt_io_saver by storing `s`. +__effects Constructs a __time_fmt_io_saver by storing `s`. Sets the `state_type` `aspect_type` with the value `new_value`. [endsect] @@ -4795,7 +4795,7 @@ __params __effects Scan `s` for the longest of all the plural forms associated with the duration units. -If sucessfull, sets the matched ratio in `rt`. Otherwise evaluates `err = std::ios_base::failbit`. +If successful, sets the matched ratio in `rt`. Otherwise evaluates `err = std::ios_base::failbit`. __returns `s`, an iterator pointing just beyond the last character that can be determined to be part of a valid name. @@ -4827,7 +4827,7 @@ __params __effects Scan `s` for the longest of all the plural forms associated with the duration units. -If sucessfull, sets the matched ratio in `rt`. Otherwise evaluates `err = std::ios_base::failbit`. +If successful, sets the matched ratio in `rt`. Otherwise evaluates `err = std::ios_base::failbit`. __returns `s`, an iterator pointing just beyond the last character that can be determined to be part of a valid name. @@ -5221,7 +5221,7 @@ __returns true if the unit associated to the given Period is named, false otherw class duration_units_default: public duration_units<CharT> { protected: - static const std::size_t pfs_ = 2; // The defaul English facet has two plural forms. + static const std::size_t pfs_ = 2; // The default English facet has two plural forms. public: typedef CharT char_type; @@ -5583,7 +5583,7 @@ __returns depending on the value of `style` return the ratio_string symbol or pr [section:manipulators I/O Manipulators] -There is a parameterized manimulator that takes the duration_style as parameter. +There is a parameterized manipulator 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`] @@ -6468,7 +6468,7 @@ Next `tp` is converted to a `time_t`, and this `time_t` is converted to a `tm`. The conversion to `tm` use `gmtime` (when available) if the timezone is __utc, else it use localtime (if available). Using the `std::time_put` facet stored in `os`, this inserter writes characters to the stream using the `tm` and the -formating string stored in the `time_punct` facet, unless that facet was missing, or unless it provided an empty string. +formatting string stored in the `time_punct` facet, unless that facet was missing, or unless it provided an empty string. If the formatting string is empty, then output as follows: @@ -6842,7 +6842,7 @@ __process_user_cpu_clock class provides access to the user CPU-time steady clock __process_system_cpu_clock satisfy the __clock_req. -__process_system_cpu_clock class provides access to the system CPU-time steady clockof the calling process. The process relative system current time can be obtained by calling `process_system_cpu_clock::now()`. +__process_system_cpu_clock class provides access to the system CPU-time steady clock of the calling process. The process relative system current time can be obtained by calling `process_system_cpu_clock::now()`. class process_system_cpu_clock { public: @@ -6931,7 +6931,7 @@ This class is the representation of the `process_cpu_clock::duration` class. As operator<<(std::basic_ostream<CharT, Traits>& os, process_times<Rep> const& rhs); -__effects Output each part separated by ';' and sourrounded by '{', '}'. +__effects Output each part separated by ';' and surrounded by '{', '}'. __throws None. @@ -7289,7 +7289,7 @@ Knowing how long a program takes to execute is useful in both test and productio class `run_timer` provides a complete run-time reporting package that can be invoked in a single line of code. The reporting is controlled by two parameters: * format : The output format -* places(precision): the number of decimal placess used. +* places(precision): the number of decimal places used. The default places is given by default_places and is 3. @@ -7364,6 +7364,20 @@ All the units are given using the suffix "s" following the System International [/==================================] [//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////] +[section [*Version 2.0.5, February 18, 2015 - 1.58] ] + +[*Fixes:] + +* [@http://svn.boost.org/trac/boost/ticket/10778 #10778] VC14 CTP4 Atomic don't compile with boost::chrono durations which are not TriviallyCopyable +* [@http://svn.boost.org/trac/boost/ticket/10840 #10840] Missing std:: qualifier for puts call in test_7868.cpp +* [@http://svn.boost.org/trac/boost/ticket/10851 #10851] Missing std:: qualifier for puts call in time_point_output.cpp +* [@http://svn.boost.org/trac/boost/ticket/10893 #10893] Minor doc typo in Boost.Chrono +* [@http://svn.boost.org/trac/boost/ticket/10992 #10992] Chrono IO state savers inconsistent with Boost.IO state savers +* [@http://svn.boost.org/trac/boost/ticket/10995 #10995] duration_put::put_value truncates fractional part +* [@http://svn.boost.org/trac/boost/ticket/11006 #11006] Impossible to instantiate time_fmt_io_saver due to several errors. +* [@http://svn.boost.org/trac/boost/ticket/11012 #11012] chrono_io v2 fail to compile with boost::chrono::duration< boost::rational<int> > + +[endsect] [/section [*Version 2.0.5] ] [section [*Version 2.0.4, July 12, 2014 - 1.56] ] [*Fixes:] @@ -7377,7 +7391,7 @@ All the units are given using the suffix "s" following the System International * [@http://svn.boost.org/trac/boost/ticket/9698 #9698] boost::chrono::thread_clock not declared in OSX * [@http://svn.boost.org/trac/boost/ticket/9720 #9720] boost::this_thread::sleep_for() sometimes returns immediately on win32 * [@http://svn.boost.org/trac/boost/ticket/9859 #9859] Remove references to gcc-mingw -* [@http://svn.boost.org/trac/boost/ticket/9918 #9918] chrono compilation error on Solaris, funciton timegm +* [@http://svn.boost.org/trac/boost/ticket/9918 #9918] chrono compilation error on Solaris, function timegm * [@http://svn.boost.org/trac/boost/ticket/9811 #9811] boost/boost/chrono/duration.hpp:355:56: error: call to non-constexpr function 'static std::numeric_limits<float>::_Ty std::numeric_limits<float>::max()' /home/zosun/input_service/inputservices-core-service/other/boost/boost/chrono/duration.hpp: In static member function 'static constexpr double boost::chrono::detail::chrono_numeric_limits<double, true>::lowest()': * [@http://svn.boost.org/trac/boost/ticket/10069 #10069] Overflow in chrono clocks on 32bit * [@http://svn.boost.org/trac/boost/ticket/10151 #10151] timegm function not available on QNX @@ -7392,7 +7406,7 @@ All the units are given using the suffix "s" following the System International * [@http://svn.boost.org/trac/boost/ticket/7868 #7868] chrono_io parses time incorrectly (1.53 and 1.52) * [@http://svn.boost.org/trac/boost/ticket/9028 #9028] Typo in boost/chrono/stopwatches/formatters/base_formatter.hpp * [@http://svn.boost.org/trac/boost/ticket/9147 #9147] uninitialized std::tm -* [@http://svn.boost.org/trac/boost/ticket/9274 #9274] lost of precission on system_clock input. +* [@http://svn.boost.org/trac/boost/ticket/9274 #9274] lost of precision on system_clock input. * [@http://svn.boost.org/trac/boost/ticket/9276 #9276] output from a system_clock::time_point get a time_point that is one day later than expected. [endsect] [/section [*Version 2.0.3] ] @@ -7420,8 +7434,8 @@ All the units are given using the suffix "s" following the System International [*Deprecated:] * The chrono i/o version included in Boost.Chrono 1.2.x has been completly 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 __duration_punct<> 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. +* chrono I/O: The manipulators __duration_short, __duration_long are deprecated. You should use the parameterized form __duration_fmt or the renamed manipulators __duration_symbol and __duration_prefix instead. +* chrono I/O: The __duration_punct<> facet is deprecated. 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_VERSION==2 the preceding deprecated functions are not available. @@ -7447,8 +7461,8 @@ When BOOST_CHRONO_VERSION==2 the preceding deprecated functions are not availabl [*Deprecated:] * The chrono i/o version included in Boost.Chrono 1.2.x has been completly 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 __duration_punct<> 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. +* chrono I/O: The manipulators __duration_short, __duration_long are deprecated. You should use the parameterized form __duration_fmt or the renamed manipulators __duration_symbol and __duration_prefix instead. +* chrono I/O: The __duration_punct<> facet is deprecated. 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_VERSION==2 the preceding deprecated functions are not available. @@ -7463,7 +7477,7 @@ When BOOST_CHRONO_VERSION==2 the preceding deprecated functions are not availabl * [@http://svn.boost.org/trac/boost/ticket/6871 #6871] chrono_io.hpp: operator<<(ostream& os, ...) modifies the state of os. - * The neww io interface provided in version 2 solves this issue. You should move to the new version. + * The new io interface provided in version 2 solves this issue. You should move to the new version. [*Known bugs not fixed yet:] @@ -7659,7 +7673,7 @@ In order to enable this features on compilers working with, you will need to def [*Bug Fixes] * __process_cpu_clock is now a valid model of __Clock that can be used with __stopclocks_accumulator__. -* eliminate or suppress a lot of warnings appearing with with warnings=all -Wextra +* eliminate or suppress a lot of warnings appearing with warnings=all -Wextra * improve the error code handling [endsect] @@ -7698,7 +7712,7 @@ In order to enable this features on compilers working with, you will need to def [*Bug Fixes] -* boost/thread/detail/cv_status.hpp file was not commited. +* boost/thread/detail/cv_status.hpp file was not committed. [endsect] @@ -7756,7 +7770,7 @@ by * Added frequency, lifetime and percentage to the default `stopwatch_accumulator_formatter`. [*Bug Fixes] -* Specific formatters didn't work completly. +* Specific formatters didn't work completely. * Replace `duration(0)` by `duration::zero()` on template classes. * `suspend` doesn't works: `partial_` not initialized neither taken in account by the elapsed function. @@ -7788,7 +7802,7 @@ by * Added digital_time formatter "%d days(s) %h:%m:%s.%n\\n" * __stopwatch_reporter is a convenient generic class reporting elapsed time for the Stopwatch concept. * Added `stopclock<__Clock>` shortcut `stopwatch_reporter<stopwatch<__Clock>>` -* Added __scoped_stopclock__ which trace at the constuctor and destructor. +* Added __scoped_stopclock__ which trace at the constructor and destructor. * Added `typeof` registration for classes __duration and __time_point * The old classes `process_times`, `process_clock`, `process_timer`, `timer` and `run_timer` are deprecated as the preceding additions are more generic. However for backward compatibility they preserved until inclusion of the library in Boost. Next follows the equivalences: @@ -7798,7 +7812,7 @@ by [*Bug Fixes] -* Try to correct warning "C4251: 'boost::chrono::run_timer::m_format' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'boost::chrono::run_timer'", by don't including inlines functions using the std::string `m_format`. +* Try to correct warning "C4251: 'boost::chrono::run_timer::m_format' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'boost::chrono::run_timer'", by don't including inline functions using the std::string `m_format`. [endsect] @@ -7847,7 +7861,7 @@ More updated documentation. * Use `INTMAC_C` to name `intmax_t` constants instead of `LL`. * Separate `chrono.cpp` on # files `win/chrono.cpp`, `mac/chrono.cpp` and `posix/chrono.cpp` to make easier the maintenance on different platforms. -* Separate `process_clock.cpp` on # files `win/process_clock.cpp`, `mac/process_clock.cpp` and `posix/process_clock.cpp` to make easier the maintenace on different platforms. +* Separate `process_clock.cpp` on # files `win/process_clock.cpp`, `mac/process_clock.cpp` and `posix/process_clock.cpp` to make easier the maintenance on different platforms. * Added the `error_code` prototype for `steady_clock::now` for `mac/chrono.cpp`. * Fully implement `mac/chrono.cpp` with error handling. * Take care on POSIX systems when `CLOCK_STEADY` is not defined. @@ -7929,7 +7943,7 @@ This operator is convenient for computing where in a time frame a given duration [heading Which APIs have been chosen to implement each clock on each platform?] -The following table presents a resume of which API is uused for each clock on each platform +The following table presents a resume of which API is used for each clock on each platform [table Clock API correspondence [[Clock] [Windows Platform] [Posix Platform] [Mac Platform] ] [[__system_clock] [GetSystemTimeAsFileTime] [clock_gettime( CLOCK_REALTIME)] [gettimeofday] ] |