|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65307 - in sandbox/chrono/libs/chrono/doc: . html html/boost_chrono html/boost_chrono/appendices html/boost_chrono/overview html/boost_chrono/reference html/boost_chrono/users_guide
From: vicente.botet_at_[hidden]
Date: 2010-09-05 15:40:44
Author: viboes
Date: 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
New Revision: 65307
URL: http://svn.boost.org/trac/boost/changeset/65307
Log:
update doc
Text files modified:
sandbox/chrono/libs/chrono/doc/chrono.qbk | 1111 +++--------------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html | 5
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/acknowledgements.html | 3
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html | 81
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html | 48
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html | 53
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tests.html | 170 --
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tickets.html | 6
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html | 17
sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html | 65
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html | 9
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html | 2373 +++++++++++++++------------------------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated.html | 6
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html | 10
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html | 505 +------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html | 37
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html | 466 ++-----
sandbox/chrono/libs/chrono/doc/html/index.html | 5
sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest | 1
21 files changed, 1544 insertions(+), 3435 deletions(-)
Modified: sandbox/chrono/libs/chrono/doc/chrono.qbk
==============================================================================
--- sandbox/chrono/libs/chrono/doc/chrono.qbk (original)
+++ sandbox/chrono/libs/chrono/doc/chrono.qbk 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -27,12 +27,12 @@
[/===============================================]
-[template common_type_link[link_text] [link boost_chrono.reference.cpp0x.common_type_hpp.common_type [link_text]]]
+[template common_type_link[link_text] [link_text]]
[def __common_type__ [common_type_link `common_type`]]
-[template common_type_macros[link_text] [link boost_chrono.reference.cpp0x.common_type_hpp.conf [link_text]]]
+[template common_type_macros[link_text] [link_text]]
-[template common_type_pp[link_text] [link boost_chrono.reference.cpp0x.common_type_hpp.pp [link_text]]]
+[template common_type_pp[link_text] [link_text]]
[def __common_type__BOOST_COMMON_TYPE_USES_STATIC_ASSERT [common_type_macros `BOOST_COMMON_TYPE_USES_STATIC_ASSERT`]]
[def __common_type__BOOST_COMMON_TYPE_USES_MPL_ASSERT [common_type_macros `BOOST_COMMON_TYPE_USES_MPL_ASSERT`]]
@@ -42,25 +42,25 @@
[/===============================================]
-[def __ratio__ [link boost_chrono.reference.cpp0x.ratio_hpp.ratio `ratio`]]
+[def __ratio__ `ratio`]
-[template ratio_conf[link_text] [link boost_chrono.reference.cpp0x.ratio_hpp.conf [link_text]]]
+[template ratio_conf[link_text] [link_text]]
-[template ratio_pp[link_text] [link boost_chrono.reference.cpp0x.ratio_hpp.pp [link_text]]]
+[template ratio_pp[link_text] [link_text]]
[def __BOOST_RATIO_USES_STATIC_ASSERT [ratio_conf `BOOST_RATIO_USES_STATIC_ASSERT`]]
[def __BOOST_RATIO_USES_MPL_ASSERT [ratio_conf `BOOST_RATIO_USES_MPL_ASSERT`]]
[def __BOOST_RATIO_USES_ARRAY_ASSERT [ratio_conf `BOOST_RATIO_USES_ARRAY_ASSERT`]]
-[template ratio_arithmetic[link_text] [link boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic [link_text]]]
+[template ratio_arithmetic[link_text] [link_text]]
[def __ratio_add [ratio_arithmetic `ratio_add`]]
[def __ratio_subtract [ratio_arithmetic `ratio_subtract`]]
[def __ratio_multiply [ratio_arithmetic `ratio_multiply`]]
[def __ratio_divide [ratio_arithmetic `ratio_divide`]]
-[template ratio_comparison[link_text] [link boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison [link_text]]]
+[template ratio_comparison[link_text] [link_text]]
[def __ratio_equal [ratio_comparison `ratio_equal`]]
[def __ratio_not_equal [ratio_comparison `ratio_not_equal`]]
[def __ratio_less [ratio_comparison `ratio_less`]]
@@ -69,7 +69,7 @@
[def __ratio_greater_equal [ratio_comparison `ratio_greater_equal`]]
-[template ratio_si_typedefs[link_text] [link boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs [link_text]]]
+[template ratio_si_typedefs[link_text] [link_text]]
[def __atto [ratio_si_typedefs `atto`]]
[def __femto [ratio_si_typedefs `femto`]]
[def __pico [ratio_si_typedefs `pico`]]
@@ -98,11 +98,11 @@
[def __BOOST_CHRONO_USES_MPL_ASSERT [chrono_conf `BOOST_CHRONO_USES_MPL_ASSERT`]]
[def __BOOST_CHRONO_USES_ARRAY_ASSERT [chrono_conf `BOOST_CHRONO_USES_ARRAY_ASSERT`]]
-[def __BOOST_CHRONO_HAS_CLOCK_MONOTONIC [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC `BOOST_CHRONO_HAS_CLOCK_MONOTONIC`]]
+[def __BOOST_CHRONO_HAS_CLOCK_MONOTONIC [link boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC `BOOST_CHRONO_HAS_CLOCK_MONOTONIC`]]
-[template clock_concept_link[link_text] [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock [link_text]]]
+[template clock_concept_link[link_text] [link boost_chrono.reference.cpp0x.system_clocks_hpp.clock [link_text]]]
[def __clock_concept__ [clock_concept_link `Clock` concept]]
[def __clock_concept_type__ [clock_concept_link `Clock`]]
[def __clock_req__ [clock_concept_link `Clock` requirements]]
@@ -110,33 +110,33 @@
[def __Clock_s__ [clock_concept_link `Clock`'s]]
-[template duration_link[link_text] [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration [link_text]]]
+[template duration_link[link_text] [link boost_chrono.reference.cpp0x.duration_hpp.duration [link_text]]]
[def __duration__ [duration_link `duration`]]
[def __duration_s__ [duration_link `duration`'s]]
[/==================]
-[template time_point_link[link_text] [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point [link_text]]]
+[template time_point_link[link_text] [link boost_chrono.reference.cpp0x.time_point_hpp.time_point [link_text]]]
[def __time_point__ [time_point_link `time_point`]]
[def __time_point_s__ [time_point_link `time_point`'s]]
[/==================]
-[template system_clock_link[link_text] [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock [link_text]]]
+[template system_clock_link[link_text] [link boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock [link_text]]]
[def __system_clock__ [system_clock_link `system_clock`]]
[/==================]
-[template monotonic_clock_link[link_text] [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock [link_text]]]
+[template monotonic_clock_link[link_text] [link boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock [link_text]]]
[def __monotonic_clock__ [monotonic_clock_link `monotonic_clock`]]
[/==================]
-[template high_resolution_clock_link[link_text] [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock [link_text]]]
+[template high_resolution_clock_link[link_text] [link boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock [link_text]]]
[def __high_resolution_clock__ [high_resolution_clock_link `high_resolution_clock`]]
-[def __duration_cast__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast `duration_cast`]]
+[def __duration_cast__ [link boost_chrono.reference.cpp0x.duration_hpp.duration_cast `duration_cast`]]
-[def __time_point_cast__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point_cast `time_point_cast`]]
+[def __time_point_cast__ [link boost_chrono.reference.cpp0x.time_point_hpp.time_point_cast `time_point_cast`]]
-[template duration_typedefs[link_text] [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs [link_text]]]
+[template duration_typedefs[link_text] [link boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs [link_text]]]
[def __nanoseconds__ [duration_typedefs `nanoseconds`]]
[def __microseconds__ [duration_typedefs `microseconds`]]
[def __milliseconds__ [duration_typedefs `milliseconds`]]
@@ -145,14 +145,14 @@
[def __hours__ [duration_typedefs `hours`]]
[def __days__ [duration_typedefs `days`]]
-[def __common_type_spe__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.common_type_spe `common_type`]]
+[def __common_type_spe__ [link boost_chrono.reference.cpp0x.duration_hpp.common_type_spe `common_type`]]
[/==================]
-[def __treat_as_floating_point__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.treat_as_floating_point `treat_as_floating_point`]]
-[def __duration_values__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values `duration_values`]]
-[def __zero__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.zero `zero`]]
-[def __max__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.max `max`]]
-[def __min__ [link boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.min `min`]]
+[def __treat_as_floating_point__ [link boost_chrono.reference.cpp0x.duration_hpp.traits.treat_as_floating_point `treat_as_floating_point`]]
+[def __duration_values__ [link boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values `duration_values`]]
+[def __zero__ [link boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.zero `zero`]]
+[def __max__ [link boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.max `max`]]
+[def __min__ [link boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.min `min`]]
[/==================]
@@ -270,12 +270,11 @@
* A type for representing points in time: __time_point__. A __time_point__ represents an epoch plus or minus a __duration__. The library leaves epochs unspecified. A __time_point__ is associated with a /clock/.
* Several clocks, some of which may not be available on a particular platform: __system_clock__, __monotonic_clock__ and __high_resolution_clock__. A clock is a pairing of a __time_point__ and __duration__, and a function which returns a __time_point__ representing ['now].
-Additionally, a minimal amount of general purpose infrastructure is provided which will support both the interface and implementation of the /clocks/, __time_point_s__ and __duration_s__ proposed herein. It is expected that these general purpose facilities will also find utility in far ranging user applications as well.
+[/Additionally, a minimal amount of general purpose infrastructure is provided which will support both the interface and implementation of the /clocks/, __time_point_s__ and __duration_s__ proposed herein. It is expected that these general purpose facilities will also find utility in far ranging user applications as well.
* __common_type__ is a traits class used to deduce a type common to a several types, useful as the return type of functions operating on multiple input types such as in mixed-mode arithmetic.
-[/* __ratio__ is a facility which is useful in specifying compile time rational constants. Compile time rational arithmetic is supported with protection against overflow and divide by zero. Such a facility is very handy when needing to efficiently represent 1/3 of a nanosecond, or specifying an inch in terms of meters (for example 254/10000 meters - which __ratio__ will reduce to 127/5000 meters).
-]
* A class template, __ratio__, for specifying compile time rational constants such as 1/3 of a nanosecond or the number of inches per meter. __ratio__ represents a compile time ratio of compile time constants with support for compile time arithmetic with overflow and division by zero protection
+]
To make the timing facilities more generally useful, __Boost_Chrono__ provides a number of clocks that are thin wrappers around the operating system's time APIs, thereby allowing the extraction of read (wall clock) time, user CPU time, system CPU time,
@@ -363,21 +362,16 @@
[[@http://www.boost.org/libs/operators [*Boost.Operators]]] [for operators, ...]
]
[
- [[@http://www.boost.org/libs/system [*Boost.System]]] [for error_code, ...]
+ [[@http://www.boost.org/libs/ratio [*Boost.Ratio]]] [for error_code, ...]
]
[
- [[@http://www.boost.org/libs/type_traits [*Boost.TypeTraits]]] [for is_base, is_convertible ...]
+ [[@http://www.boost.org/libs/system [*Boost.System]]] [for error_code, ...]
]
[
- [[@http://www.boost.org/libs/utility [*Boost.Utility/EnableIf]]] [for enable_if, ...]
-]
+ [[@http://www.boost.org/libs/type_traits [*Boost.TypeTraits]]] [for is_base, is_convertible, common_type, ...]
]
-
-__Boost_Chrono__ depends optionaly on:
-
-[variablelist
[
- [[@http://www.boost.org/libs/typeof [*Boost.Typeof]]] [for duration and time_point registration when typeof/boost/chrono/chrono.hpp is include or when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined]
+ [[@http://www.boost.org/libs/utility [*Boost.Utility/EnableIf]]] [for enable_if, ...]
]
]
@@ -473,79 +467,6 @@
[section Tutorial]
-[/note If you have not read yet the [@boost_chrono/overview/motivation.html motivation section], please read it now.]
-
-[section Common Type]
-
-__common_type__ has been a recurring theme in many places for many years. We've previously known it as promote and examples of it are spread throughout boost. It has been reinvented independently several times, because it is so useful.
-
-Andrei Alexandrescu recently pointed us at a D library: std.traits - D Programming Language - Digital Mars, which became the motivation for this particular name, and the variadic nature of [@http://www.digitalmars.com/d/2.0/phobos/std_traits.html#CommonType this trait].
-
-[section So What is `common_type` and How can I use it?]
-
-In a nutshell, __common_type__ is a trait that takes 1 or more types, and returns a type which all of the types will convert to. The default definition demands this conversion be implicit. However the trait can be specialized for user-defined types which want to limit their inter-type conversions to explicit, and yet still want to interoperate with the __common_type__ facility.
-
-[*Example:]
-
- template <class T, class U>
- typename __common_type__<complex<T>, complex<U> >::type
- operator+(complex<T>, complex<U>);
-
-In the above example, "mixed-mode" complex arithmetic is allowed. The return type is described by __common_type__. For example the resulting type of adding a `complex<int>` and `complex<double>` might be a `complex<double>`. Another choice for the author might be:
-
- template <class T, class U>
- complex<typename __common_type__<T, U>::type>
- operator+(complex<T>, complex<U>);
-
-Here is how someone might produce a variadic comparison function:
-
- template <class ...T>
- typename __common_type__<T...>::type
- min(T... t);
-
-This is a very useful and broadly applicable utility. The __duration__ and __time_point__ facilities use it to make multi-precision arithmetic seamless and exact.
-
-[endsect]
-
-[section How to get the common type of inter-type with explicit conversions?]
-
-The default definition of __common_type__ demands the conversion be implicit. However the trait can be specialized for user-defined types which want to limit their inter-type conversions to explicit, and yet still want to interoperate with the __common_type__ facility.
-
-
-[endsect]
-
-[endsect]
-
-
-[section Ratio]
-
-__ratio__ is a general purpose utility inspired by Walter Brown allowing one to easily and safely compute rational values at compile time. The __ratio__ class catches all errors (such as divide by zero and overflow) at compile time. It is used in the __duration__ and __time_point__ classes to efficiently create units of time. It can also be used in other "quantity" libraries (both std-defined and user-defined), or anywhere there is a rational constant which is known at compile time. The use of this utility can greatly reduce the chances of run time overflow because the __ratio__ (and any ratios resulting from __ratio__ arithmetic) are always reduced to lowest terms.
-
-__ratio__ is a template taking two intmax_ts, with the second defaulted to 1. In addition to copy constructors and assignement, it only has two public members, both of which are static const intmax_t. One is the numerator of the __ratio__ and the other is the denominator. The __ratio__ is always normalized such that it is expressed in lowest terms, and the denominator is always positive. When the numerator is 0, the denominator is always 1.
-
-[*Example:]
-
- typedef __ratio__<5, 3> five_thirds;
- // five_thirds::num == 5, five_thirds::den == 3
-
- typedef __ratio__<25, 15> also_five_thirds;
- // also_five_thirds::num == 5, also_five_thirds::den == 3
-
- typedef ratio_divide<five_thirds, also_five_thirds>::type one;
- // one::num == 1, one::den == 1
-
-This facility also includes convenience typedefs for the SI prefixes __atto through __exa corresponding to their internationally recognized definitions (in terms of __ratio__). This is a tremendous syntactic convenience. It will prevent errors in specifying constants as one no longer has to double count the number of zeros when trying to write million or billion.
-
-[*Example:]
-
- typedef ratio_multiply<__ratio__<5>, giga>::type _5giga;
- // _5giga::num == 5000000000, _5giga::den == 1
-
- typedef ratio_multiply<__ratio__<5>, nano>::type _5nano;
- // _5nano::num == 1, _5nano::den == 200000000
-
-[endsect]
-
[section Duration]
The __duration__ is the heart of this library. The interface that the user will see in everyday use is nearly identical to that of Boost.DateTime time __duration_s__ authored by Jeff Garland, both in syntax and in behavior. This has been a very popular boost library for 7 years. There is an enormous positive history with this interface.
@@ -939,238 +860,6 @@
[endsect]
-[section Ratio]
-
-[/===============]
-[section SI-units]
-[/===============]
-
-Type-safe "physics" code interoperating with boost::chrono::__duration__ types and taking advantage of the boost::__ratio__ infrastructure and design philosophy.
-
-length - mimics boost::chrono::__duration__ except restricts representation to double.
-Uses boost::__ratio__ facilities for length units conversions.
-
- template <class Ratio>
- class length {
- private:
- double len_;
- public:
- typedef Ratio ratio;
- length() : len_(1) {}
- length(const double& len) : len_(len) {}
-
- template <class R>
- length(const length<R>& d)
- : len_(d.count() * boost::ratio_divide<Ratio, R>::type::den /
- boost::ratio_divide<Ratio, R>::type::num) {}
-
- double count() const {return len_;}
-
- length& operator+=(const length& d) {len_ += d.count(); return *this;}
- length& operator-=(const length& d) {len_ -= d.count(); return *this;}
-
- length operator+() const {return *this;}
- length operator-() const {return length(-len_);}
-
- length& operator*=(double rhs) {len_ *= rhs; return *this;}
- length& operator/=(double rhs) {len_ /= rhs; return *this;}
- };
-
-
-Sparse sampling of length units
-
- typedef length<boost::__ratio__<1> > meter; // set meter as "unity"
- typedef length<boost::__centi> centimeter; // 1/100 meter
- typedef length<boost::__kilo> kilometer; // 1000 meters
- typedef length<boost::__ratio__<254, 10000> > inch; // 254/10000 meters
-
-length takes __ratio__ instead of two integral types so that definitions can be made like so:
-
- typedef length<boost::ratio_multiply<boost::__ratio__<12>, inch::__ratio__>::type> foot; // 12 inchs
- typedef length<boost::ratio_multiply<boost::__ratio__<5280>, foot::__ratio__>::type> mile; // 5280 feet
-
-Need a floating point definition of seconds
-
- typedef boost::chrono::__duration__<double> seconds; // unity
-
-Demo of (scientific) support for sub-nanosecond resolutions
-
- typedef boost::chrono::__duration__<double, boost::__pico> picosecond; // 10^-12 seconds
- typedef boost::chrono::__duration__<double, boost::__femto> femtosecond; // 10^-15 seconds
- typedef boost::chrono::__duration__<double, boost::__atto> attosecond; // 10^-18 seconds
-
-A very brief proof-of-concept for SIUnits-like library. Hard-wired to floating point seconds and meters, but accepts other units.
-
- template <class R1, class R2>
- class quantity
- {
- double q_;
- public:
- typedef R1 time_dim;
- typedef R2 distance_dim;
- quantity() : q_(1) {}
-
- double get() const {return q_;}
- void set(double q) {q_ = q;}
- };
-
- template <>
- class quantity<boost::__ratio__<1>, boost::__ratio__<0> >
- {
- double q_;
- public:
- quantity() : q_(1) {}
- quantity(seconds d) : q_(d.count()) {} // note: only User1::seconds needed here
-
- double get() const {return q_;}
- void set(double q) {q_ = q;}
- };
-
- template <>
- class quantity<boost::__ratio__<0>, boost::__ratio__<1> >
- {
- double q_;
- public:
- quantity() : q_(1) {}
- quantity(meter d) : q_(d.count()) {} // note: only User1::meter needed here
-
- double get() const {return q_;}
- void set(double q) {q_ = q;}
- };
-
- template <>
- class quantity<boost::__ratio__<0>, boost::__ratio__<0> >
- {
- double q_;
- public:
- quantity() : q_(1) {}
- quantity(double d) : q_(d) {}
-
- double get() const {return q_;}
- void set(double q) {q_ = q;}
- };
-
-Example of SI-Units
-
- typedef quantity<boost::__ratio__<0>, boost::__ratio__<0> > Scalar;
- typedef quantity<boost::__ratio__<1>, boost::__ratio__<0> > Time; // second
- typedef quantity<boost::__ratio__<0>, boost::__ratio__<1> > Distance; // meter
- typedef quantity<boost::__ratio__<-1>, boost::__ratio__<1> > Speed; // meter/second
- typedef quantity<boost::__ratio__<-2>, boost::__ratio__<1> > Acceleration; // meter/second^2
-
-Quantity arithmetics
-
- template <class R1, class R2, class R3, class R4>
- quantity<typename boost::ratio_subtract<R1, R3>::type,
- typename boost::ratio_subtract<R2, R4>::type>
- operator/(const quantity<R1, R2>& x, const quantity<R3, R4>& y)
- {
- typedef quantity<typename boost::ratio_subtract<R1, R3>::type,
- typename boost::ratio_subtract<R2, R4>::type> R;
- R r;
- r.set(x.get() / y.get());
- return r;
- }
-
- template <class R1, class R2, class R3, class R4>
- quantity<typename boost::ratio_add<R1, R3>::type,
- typename boost::ratio_add<R2, R4>::type>
- operator*(const quantity<R1, R2>& x, const quantity<R3, R4>& y)
- {
- typedef quantity<typename boost::ratio_add<R1, R3>::type,
- typename boost::ratio_add<R2, R4>::type> R;
- R r;
- r.set(x.get() * y.get());
- return r;
- }
-
- template <class R1, class R2>
- quantity<R1, R2>
- operator+(const quantity<R1, R2>& x, const quantity<R1, R2>& y)
- {
- typedef quantity<R1, R2> R;
- R r;
- r.set(x.get() + y.get());
- return r;
- }
-
- template <class R1, class R2>
- quantity<R1, R2>
- operator-(const quantity<R1, R2>& x, const quantity<R1, R2>& y)
- {
- typedef quantity<R1, R2> R;
- R r;
- r.set(x.get() - y.get());
- return r;
- }
-
-Example type-safe physics function
-
- Distance
- compute_distance(Speed v0, Time t, Acceleration a)
- {
- return v0 * t + Scalar(.5) * a * t * t; // if a units mistake is made here it won't compile
- }
-
-
-Exercise example type-safe physics function and show interoperation
-of custom time durations (User1::seconds) and standard time durations (boost::hours).
-Though input can be arbitrary (but type-safe) units, output is always in SI-units
-(a limitation of the simplified Units lib demoed here).
-
- int main()
- {
- typedef boost::__ratio__<8, BOOST_INTMAX_C(0x7FFFFFFFD)> R1;
- typedef boost::__ratio__<3, BOOST_INTMAX_C(0x7FFFFFFFD)> R2;
- typedef User1::quantity<boost::ratio_subtract<boost::__ratio__<0>, boost::__ratio__<1> >::type,
- boost::ratio_subtract<boost::__ratio__<1>, boost::__ratio__<0> >::type > RR;
- typedef boost::ratio_subtract<R1, R2>::type RS;
- std::cout << RS::num << '/' << RS::den << '\n';
-
-
- std::cout << "*************\n";
- std::cout << "* testUser1 *\n";
- std::cout << "*************\n";
- User1::Distance d( User1::mile(110) );
- User1::Time t( boost::chrono::__hours__(2) );
-
- RR r=d / t;
- //r.set(d.get() / t.get());
-
- User1::Speed rc= r;
-
- User1::Speed s = d / t;
- std::cout << "Speed = " << s.get() << " meters/sec\n";
- User1::Acceleration a = User1::Distance( User1::foot(32.2) ) / User1::Time() / User1::Time();
- std::cout << "Acceleration = " << a.get() << " meters/sec^2\n";
- User1::Distance df = compute_distance(s, User1::Time( User1::seconds(0.5) ), a);
- std::cout << "Distance = " << df.get() << " meters\n";
- std::cout << "There are "
- << User1::mile::ratio::den << '/' << User1::mile::ratio::num << " miles/meter";
- User1::meter mt = 1;
- User1::mile mi = mt;
- std::cout << " which is approximately " << mi.count() << '\n';
- std::cout << "There are "
- << User1::mile::ratio::num << '/' << User1::mile::ratio::den << " meters/mile";
- mi = 1;
- mt = mi;
- std::cout << " which is approximately " << mt.count() << '\n';
- User1::attosecond as(1);
- User1::seconds sec = as;
- std::cout << "1 attosecond is " << sec.count() << " seconds\n";
- std::cout << "sec = as; // compiles\n";
- sec = User1::seconds(1);
- as = sec;
- std::cout << "1 second is " << as.count() << " attoseconds\n";
- std::cout << "as = sec; // compiles\n";
- std::cout << "\n";
- return 0;
- }
-
-['See the source file [@../../test/ratio_test.cpp test/ratio_test.cpp]]
-
-[endsect]
-[endsect]
[section Duration]
@@ -1917,341 +1606,70 @@
[section:cpp0x Included on the C++0x recommendation]
-[/===================================================================]
-[section:common_type_hpp Header `<boost/type_traits/common_type.hpp>`]
-[/===================================================================]
-
- // configuration macros
- #define __common_type__BOOST_COMMON_TYPE_USES_STATIC_ASSERT
- #define __common_type__BOOST_COMMON_TYPE_USES_MPL_ASSERT
- #define __common_type__BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
- #define __common_type__BOOST_COMMON_TYPE_DONT_USE_TYPEOF
-
- // preprocessor info
- #define __common_type__BOOST_COMMON_TYPE_ARITY
-
- namespace boost {
- template <class ...T> struct __common_type__;
- }
-
-[section:conf Configuration macros]
-
-When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static assertions are reported. Define
-
-* BOOST_COMMON_TYPE_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
-* BOOST_COMMON_TYPE_USES_MPL_ASSERT: define it if you want to use Boost.MPL static asertions
-* BOOST_COMMON_TYPE_USES_ARRAY_ASSERT: define it if you want to use internal static asertions
-* nothing if you don't want static asertions
-
-When BOOST_COMMON_TYPE_USES_MPL_ASSERT is not defined the following symbols are defined as
-
- #define BOOST_COMMON_TYPE_MUST_BE_A_COMPLETE_TYPE \
- "must be complete type"
-
-Depending on the static assertion used system you will have an hint of the failing assertion either through the symbol or through the texte.
-
-When BOOST_NO_DECLTYPE is not defined common_type is implemented using decltype. Otherwise when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined it uses Boost.TypeOf.
-
-[endsect]
-
-[section:pp Preprocessor info]
-
-When BOOST_NO_VARIADIC_TEMPLATES is defined BOOST_COMMON_TYPE_ARITY gives the maximum number of template parameters for __common_type__.
-
-[endsect]
-
-[section:common_type Class Template `common_type<>`]
-
-__common_type__ is a traits class used to deduce a type common to a several types, useful as the return type of functions operating on multiple input types such as in mixed-mode arithmetic..
-
-The nested typedef __common_type__::type` could be defined as follows:
-
- template <class T, class U = void, class V = void>
- struct common_type {
- typedef typename __common_type__<typename __common_type__<T, U>::type, V>::type type;
- };
-
- template <class T>
- struct common_type<T, void, void> {
- typedef T type;
- };
-
- template <class T, class U>
- struct common_type<T, U, void> {
- private:
- static T m_t();
- static U m_u();
- static bool m_f(); // workaround gcc bug; not required by std
- public:
- typedef BOOST_TYPEOF_TPL(m_f() ? m_t() : m_u()) type;
- };
-
-All parameter types must be complete. This trait is permitted to be specialized by a user if at least one template parameter is a user-defined type.
+[/=============================================]
+[section:chrono_hpp Header `<boost/chrono.hpp>`]
+[/=============================================]
-[*Note:] Such specializations are required when only explicit conversions are desired among the __common_type__ arguments.
+This file is a redirection to `boost/chrono/chrono.hpp` including in addition registration for __duration__ and __time_point__ class templates to Boost.Typeof.
-[endsect]
+ #include <boost/chrono/chrono.hpp>
+ #include <boost/chrono/typeof/boost/chrono/chrono.hpp>
[endsect]
+[/=============================================]
+[section:chrono_chrono_hpp Header `<boost/chrono/chrono.hpp>`]
+[/=============================================]
-[/===========================================]
-[section:ratio_hpp Header `<boost/ratio.hpp>`]
-[/===========================================]
-
-__ratio__ is a facility which is useful in specifying compile time rational constants. Compile time rational arithmetic is supported with protection against overflow and divide by zero. Such a facility is very handy when needing to efficiently represent 1/3 of a nanosecond, or specifying an inch in terms of meters (for example 254/10000 meters - which __ratio__ will reduce to 127/5000 meters).
-
- // configuration macros
- #define __BOOST_RATIO_USES_STATIC_ASSERT
- #define __BOOST_RATIO_USES_MPL_ASSERT
- #define __BOOST_RATIO_USES_ARRAY_ASSERT
-
- namespace boost {
-
- template <boost::intmax_t N, boost::intmax_t D = 1> class __ratio__;
-
- // ratio arithmetic
- template <class R1, class R2> struct __ratio_add;
- template <class R1, class R2> struct __ratio_subtract;
- template <class R1, class R2> struct __ratio_multiply;
- template <class R1, class R2> struct __ratio_divide;
-
- // ratio comparison
- template <class R1, class R2> struct __ratio_equal;
- template <class R1, class R2> struct __ratio_not_equal;
- template <class R1, class R2> struct __ratio_less;
- template <class R1, class R2> struct __ratio_less_equal;
- template <class R1, class R2> struct __ratio_greater;
- template <class R1, class R2> struct __ratio_greater_equal;
-
- // convenience SI typedefs
- typedef ratio<1LL, 1000000000000000000LL> __atto;
- typedef ratio<1LL, 1000000000000000LL> __femto;
- typedef ratio<1LL, 1000000000000LL> __pico;
- typedef ratio<1LL, 1000000000LL> __nano;
- typedef ratio<1LL, 1000000LL> __micro;
- typedef ratio<1LL, 1000LL> __milli;
- typedef ratio<1LL, 100LL> __centi;
- typedef ratio<1LL, 10LL> __deci;
- typedef ratio< 10LL, 1LL> __deca;
- typedef ratio< 100LL, 1LL> __hecto;
- typedef ratio< 1000LL, 1LL> __kilo;
- typedef ratio< 1000000LL, 1LL> __mega;
- typedef ratio< 1000000000LL, 1LL> __giga;
- typedef ratio< 1000000000000LL, 1LL> __tera;
- typedef ratio< 1000000000000000LL, 1LL> __peta;
- typedef ratio<1000000000000000000LL, 1LL> __exa;
- }
-
+ #include <boost/chrono/duration.hpp>
+ #include <boost/chrono/time_point.hpp>
+ #include <boost/chrono/system_clocks.hpp>
[section:conf Configuration macros]
+
When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static assertions are reported. Define
-* BOOST_RATIO_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
-* BOOST_RATIO_USES_MPL_ASSERT: define it if you want to use Boost.MPL static asertions
-* BOOST_RATIO_USES_ARRAY_ASSERT: define it if you want to use internal static asertions
+* 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
* nothing if you don't want static asertions
-When BOOST_RATIO_USES_MPL_ASSERT is not defined the following symbols are defined as
+When BOOST_CHRONO_USES_MPL_ASSERT is not defined the following symbols are defined as
- #define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
- #define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub"
- #define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul"
- #define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
- #define BOOST_RATIO_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
- #define BOOST_RATIO_RATIO_DIVIDE_BY_0 "ratio divide by 0"
- #define BOOST_RATIO_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
+ #define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION \
+ "A duration representation can not be a duration"
+ #define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO \
+ "Second template parameter of duration must be a std::ratio"
+ #define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE \
+ "duration period must be positive"
+ #define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION \
+ "Second template parameter of time_point must be a boost::chrono::duration"
Depending on the static assertion used system you will have an hint of the failing assertion either through the symbol or through the texte.
[endsect]
-[section:ratio Class Template `ratio<>`]
-
- template <boost::intmax_t N, boost::intmax_t D>
- class ratio {
- public:
- static const boost::intmax_t num;
- static const boost::intmax_t den;
- typedef ratio<num, den> type;
-
- ratio() = default;
-
- template <intmax_t _N2, intmax_t _D2>
- ratio(const ratio<_N2, _D2>&);
-
- template <intmax_t _N2, intmax_t _D2>
- ratio& operator=(const ratio<_N2, _D2>&) {return *this;}
- };
-
-A diagnostic will be emitted if __ratio__ is instantiated with `D == 0`, or if the absolute value of `N` or `D` can not be represented. [*Note:] These rules ensure that infinite ratios are avoided and that for any negative input, there exists a representable value of its absolute value which is positive. In a two's complement representation, this excludes the most negative value.
-
-Let `gcd` denote the greatest common divisor of `N`'s absolute value and of `D`'s absolute value.
-
-* `num` has the value `sign(N)*sign(D)*abs(N)/gcd`.
-* `den` has the value `abs(D)/gcd`.
-
-The nested typedef `type` denotes the normalized form of this __ratio__ type. It should be used when the template parameters doesn't give a normalized form.
-
-Two __ratio__ classes `__ratio__<N1,D1>` and `__ratio__<N2,D2>` have the same normalized form if `__ratio__<N1,D1>::type` is the same type as `__ratio__<N2,D2>::type`
-
-[section:ca Construction and assignment]
-
- template <intmax_t N2, intmax_t D2>
- ratio(const __ratio__<N2, D2>& r);
-
-[*Effects:] Constructs a __ratio__ object.
-
-[*Remarks:] This constructor will not participate in overload resolution unless `r` has the same normalized form as `*this`.
-
- template <intmax_t N2, intmax_t D2>
- __ratio__& operator=(const __ratio__<N2, D2>& r);
-
-[*Effects:] Assigns a __ratio__ object.
-
-[*Returns:] *this.
-
-[*Remarks:] This operator will not participate in overload resolution unless `r` has the same normalized form as `*this`.
-
-[endsect]
-
-
-[endsect]
-
-
-[section:ratio_arithmetic `ratio` arithmetic]
-
-For each of the class templates in this clause, each template parameter refers to a `ratio`. If the implementation is unable to form the indicated __ratio__ due to overflow, a diagnostic will be issued.
-
- template <class R1, class R2> struct ratio_add {
- typedef [/see below] type;
- };
-
-The nested typedef `type` is a synonym for `__ratio__<R1::num * R2::den + R2::num * R1::den, R1::den * R2::den>::type`.
-
- template <class R1, class R2> struct ratio_subtract {
- typedef [/see below] type;
- };
-
-The nested typedef `type` is a synonym for `__ratio__<R1::num * R2::den - R2::num * R1::den, R1::den * R2::den>::type`.
-
- template <class R1, class R2> struct ratio_multiply {
- typedef [/see below] type;
- };
-
-The nested typedef `type` is a synonym for `__ratio__<R1::num * R2::num, R1::den * R2::den>::type`.
-
- template <class R1, class R2> struct ratio_divide {
- typedef [/see below] type;
- };
-
-The nested typedef `type` is a synonym for `__ratio__<R1::num * R2::den, R2::num * R1::den>::type`.
-
-[endsect]
-
-[section:ratio_comparison `ratio` comparison]
-
- template <class R1, class R2> struct ratio_equal
- : public boost::integral_constant<bool, [/see below] > {};
-
-If R1::num == R2::num && R1::den == R2::den, ratio_equal derives from true_type, else derives from false_type.
-
- template <class R1, class R2>
- struct ratio_less
- : public boost::integral_constant<bool, [/see below] > {};
-
-If R1::num * R2::den < R2::num * R1::den, ratio_less derives from true_type, else derives from false_type.
-
- template <class R1, class R2> struct ratio_not_equal
- : public boost::integral_constant<bool, !ratio_equal<R1, R2>::value> {};
-
- template <class R1, class R2> struct ratio_less_equal
- : public boost::integral_constant<bool, !ratio_less<R2, R1>::value> {};
-
- template <class R1, class R2> struct ratio_greater
- : public boost::integral_constant<bool, ratio_less<R2, R1>::value> {};
-
- template <class R1, class R2> struct ratio_greater_equal
- : public boost::integral_constant<bool, !ratio_less<R1, R2>::value> {};
-
-
-[endsect]
-
-[section:ratio_si_typedefs SI typedefs]
-
- // convenience SI typedefs
- typedef __ratio__<1LL, 1000000000000000000LL> atto;
- typedef __ratio__<1LL, 1000000000000000LL> femto;
- typedef __ratio__<1LL, 1000000000000LL> pico;
- typedef __ratio__<1LL, 1000000000LL> nano;
- typedef __ratio__<1LL, 1000000LL> micro;
- typedef __ratio__<1LL, 1000LL> milli;
- typedef __ratio__<1LL, 100LL> centi;
- typedef __ratio__<1LL, 10LL> deci;
- typedef __ratio__< 10LL, 1LL> deca;
- typedef __ratio__< 100LL, 1LL> hecto;
- typedef __ratio__< 1000LL, 1LL> kilo;
- typedef __ratio__< 1000000LL, 1LL> mega;
- typedef __ratio__< 1000000000LL, 1LL> giga;
- typedef __ratio__< 1000000000000LL, 1LL> tera;
- typedef __ratio__< 1000000000000000LL, 1LL> peta;
- typedef __ratio__<1000000000000000000LL, 1LL> exa;
-
-
-Four of the typedefs in the recomendation which can be conditionally supported are not supported: yocto, zepto, zetta and yotta.
-
- typedef __ratio__<1, 1000000000000000000000000> yocto; // conditionally supported
- typedef __ratio__<1, 1000000000000000000000> zepto; // conditionally supported
- typedef __ratio__< 1000000000000000000000, 1> zetta; // conditionally supported
- typedef __ratio__<1000000000000000000000000, 1> yotta; // conditionally supported
-
-[endsect]
-
-[endsect]
-
-[/=============================================]
-[section:chrono_hpp Header `<boost/chrono.hpp>`]
-[/=============================================]
-
-This file is a redirection to `boost/chrono/chrono.hpp` including in addition registration for __duration__ and __time_point__ class templates to Boost.Typeof.
-
-
- #include <boost/chrono/chrono.hpp>
- #include <boost/chrono/typeof/boost/chrono/chrono.hpp>
[endsect]
[/=============================================]
-[section:chrono_chrono_hpp Header `<boost/chrono/chrono.hpp>`]
+[section:duration_hpp Header `<boost/chrono/duration.hpp>`]
[/=============================================]
- // configuration macros
- #define __BOOST_CHRONO_USES_STATIC_ASSERT
- #define __BOOST_CHRONO_USES_MPL_ASSERT
- #define __BOOST_CHRONO_USES_ARRAY_ASSERT
-
- // preprocessor info
- #define __BOOST_CHRONO_HAS_CLOCK_MONOTONIC
-
namespace boost {
namespace chrono {
template <class Rep, class Period = __ratio__<1> > class __duration__;
- template <class Clock, class Duration = typename Clock::duration> class __time_point__;
}
template <class Rep1, class Period1, class Rep2, class Period2>
struct __common_type_spe__<__duration__<Rep1, Period1>,
__duration__<Rep2, Period2> >;
- template <class Clock, class Duration1, class Duration2>
- struct __common_type_spe__<__time_point__<Clock, Duration1>,
- __time_point__<Clock, Duration2> >;
-
namespace chrono {
// customization traits
@@ -2265,161 +1683,61 @@
template <class Rep1, class Period1, class Rep2, class Period2>
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
- operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Rep1, class Period, class Rep2>
- duration<typename common_type<Rep1, Rep2>::type, Period>
- operator*(const duration<Rep1, Period>& d, const Rep2& s);
-
- template <class Rep1, class Period, class Rep2>
- duration<typename common_type<Rep1, Rep2>::type, Period>
- operator*(const Rep1& s, const duration<Rep2, Period>& d);
-
- template <class Rep1, class Period, class Rep2>
- duration<typename common_type<Rep1, Rep2>::type, Period>
- operator/(const duration<Rep1, Period>& d, const Rep2& s);
-
- template <class Rep1, class Period1, class Rep2, class Period2>
- typename common_type<Rep1, Rep2>::type
- operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Rep1, class Rep2, class Period>
- double operator/(const Rep1& s, const duration<Rep2, Period>& d);
-
- // duration comparisons
- template <class Rep1, class Period1, class Rep2, class Period2>
- bool operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Rep1, class Period1, class Rep2, class Period2>
- bool operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Rep1, class Period1, class Rep2, class Period2>
- bool operator< (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
- template <class Rep1, class Period1, class Rep2, class Period2>
- bool operator<=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Rep1, class Period1, class Rep2, class Period2>
- bool operator> (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
- template <class Rep1, class Period1, class Rep2, class Period2>
- bool operator>=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
- // duration_cast
-
- template <class ToDuration, class Rep, class Period>
- ToDuration __duration_cast__(const __duration__<Rep, Period>& d);
-
- // convenience typedefs
- typedef duration<boost::int_least64_t, nano> __nanoseconds__; // at least 64 bits needed
- typedef duration<boost::int_least64_t, micro> __microseconds__; // at least 55 bits needed
- typedef duration<boost::int_least64_t, milli> __milliseconds__; // at least 45 bits needed
- typedef duration<boost::int_least64_t> __seconds__; // at least 35 bits needed
- typedef duration<boost::int_least32_t, ratio< 60> > __minutes__; // at least 29 bits needed
- typedef duration<boost::int_least32_t, ratio<3600> > __hours__; // at least 23 bits needed
-
- // time_point arithmetic
- template <class Clock, class Duration1, class Rep2, class Period2>
- time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
- operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Rep1, class Period1, class Clock, class Duration2>
- time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type>
- operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs);
-
- template <class Clock, class Duration1, class Rep2, class Period2>
- time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
- operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Clock, class Duration1, class Duration2>
- typename common_type<Duration1, Duration2>::type
- operator-(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
- Duration2>& rhs);
-
- // time_point comparisons
- template <class Clock, class Duration1, class Duration2>
- bool operator==(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- bool operator!=(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- bool operator< (const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- bool operator<=(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- bool operator> (const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- bool operator>=(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
-
- // time_point_cast
- template <class ToDuration, class Clock, class Duration>
- time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
-
- // Clocks
- class __system_clock__;
- class __monotonic_clock__;
- class __high_resolution_clock__;
-
- }
- }
-
-
-[section:conf Configuration macros]
+ operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
+ template <class Rep1, class Period, class Rep2>
+ duration<typename common_type<Rep1, Rep2>::type, Period>
+ operator*(const duration<Rep1, Period>& d, const Rep2& s);
-When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static assertions are reported. Define
+ template <class Rep1, class Period, class Rep2>
+ duration<typename common_type<Rep1, Rep2>::type, Period>
+ operator*(const Rep1& s, const duration<Rep2, Period>& d);
-* 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
-* nothing if you don't want static asertions
+ template <class Rep1, class Period, class Rep2>
+ duration<typename common_type<Rep1, Rep2>::type, Period>
+ operator/(const duration<Rep1, Period>& d, const Rep2& s);
-When BOOST_CHRONO_USES_MPL_ASSERT is not defined the following symbols are defined as
+ template <class Rep1, class Period1, class Rep2, class Period2>
+ typename common_type<Rep1, Rep2>::type
+ operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
- #define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION \
- "A duration representation can not be a duration"
- #define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO \
- "Second template parameter of duration must be a std::ratio"
- #define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE \
- "duration period must be positive"
- #define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION \
- "Second template parameter of time_point must be a boost::chrono::duration"
+ template <class Rep1, class Rep2, class Period>
+ double operator/(const Rep1& s, const duration<Rep2, Period>& d);
-Depending on the static assertion used system you will have an hint of the failing assertion either through the symbol or through the texte.
+ // duration comparisons
+ template <class Rep1, class Period1, class Rep2, class Period2>
+ bool operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-[endsect]
+ template <class Rep1, class Period1, class Rep2, class Period2>
+ bool operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-[section:clock `Clock` Requirements]
+ template <class Rep1, class Period1, class Rep2, class Period2>
+ bool operator< (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
+ template <class Rep1, class Period1, class Rep2, class Period2>
+ bool operator<=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-A clock represents a bundle consisting of a native __duration__, a native __time_point__, and a function `now()` to get the current __time_point__. A clock must meet the requirements in the following Table.
+ template <class Rep1, class Period1, class Rep2, class Period2>
+ bool operator> (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
+ template <class Rep1, class Period1, class Rep2, class Period2>
+ bool operator>=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-In this table `C1` and `C2` denote `clock` types. `t1` and `t2` are values returned from `C1::now()` where the call returning `t1` happens before the call returning `t2` and both of these calls happen before `C1::time_point::max()`.
+ // duration_cast
-[table Clock Requirements
- [[expression] [return type] [operational semantics]]
- [[`C1::rep`] [An arithmetic type or class emulating an arithmetic type. ] [The representation type of the native __duration__ and __time_point__.]]
- [[`C1::period`] [`ratio`] [The tick period of the clock in seconds.]]
- [[`C1::duration`] [`chrono::duration<C1::rep, C1::period>`] [The native __duration__ type of the `clock`.]]
- [[`C1::time_point`] [`chrono::time_point<C1> or chrono::time_point<C2, C1::duration>`] [The native __time_point__ type of the `clock`. Different clocks are permitted to share a __time_point__ definition if it is valid to compare their time_points by comparing their respective __duration_s__. `C1` and `C2` must refer to the same epoch.]]
- [[`C1::is_monotonic`] [`const bool`] [`true` if `t1 <= t2` is always `true`, else `false`. *Note*: A `clock` that can be adjusted backwards is not monotonic]]
- [[`C1::now()`] [`C1::time_point`] [Returns a __time_point__ representing the current point in time.]]
-]
+ template <class ToDuration, class Rep, class Period>
+ ToDuration __duration_cast__(const __duration__<Rep, Period>& d);
+ // convenience typedefs
+ typedef duration<boost::int_least64_t, nano> __nanoseconds__; // at least 64 bits needed
+ typedef duration<boost::int_least64_t, micro> __microseconds__; // at least 55 bits needed
+ typedef duration<boost::int_least64_t, milli> __milliseconds__; // at least 45 bits needed
+ typedef duration<boost::int_least64_t> __seconds__; // at least 35 bits needed
+ typedef duration<boost::int_least32_t, ratio< 60> > __minutes__; // at least 29 bits needed
+ typedef duration<boost::int_least32_t, ratio<3600> > __hours__; // at least 23 bits needed
-Models of Clock:
+ }
+ }
-* __system_clock__
-* __monotonic_clock__
-* __high_resolution_clock__
-* __process_real_cpu_clock__
-* __process_user_cpu_clock__
-* __process_system_cpu_clock__
-* __thread_clock__
-[endsect]
[section:traits Time-related traits]
[section:treat_as_floating_point Metafunction `treat_as_floating_point<>`]
@@ -2476,7 +1794,7 @@
[endsect]
-[section:common_type_spe `common_type` specializations]
+[section:common_type_spe `common_type` specialization]
template <class Rep1, class Period1, class Rep2, class Period2>
struct __common_type__<chrono::__duration__<Rep1, Period1>, chrono::__duration__<Rep2, Period2> >
@@ -2488,14 +1806,6 @@
[*Note:] The typedef type is the __duration__ with the largest tick period possible where both __duration__ arguments will convert to it without requiring a division operation. The representation of this type is intended to be able to hold any value resulting from this conversion, with the possible exception of round-off error when floating point __duration_s__ are involved (but not truncation error).
- template <class Clock, class Duration1, class Duration2>
- struct __common_type__<chrono::__time_point__<Clock, Duration1>, chrono::__time_point__<Clock, Duration2> >
- {
- typedef chrono::__time_point__<Clock, typename __common_type__<Duration1, Duration2>::type> type;
- };
-
-The __common_type__ of two __time_point_s__ is a __time_point__ with the same `clock` (both have the same `clock`), and the __common_type__ of the two __duration_s__.
-
[endsect]
@@ -2917,6 +2227,95 @@
[endsect]
+[section:duration_typedefs `duration` typedefs]
+
+ // convenience typedefs
+ typedef __duration__<boost::int_least64_t, nano> nanoseconds; // at least 64 bits needed
+ typedef __duration__<boost::int_least64_t, micro> microseconds; // at least 55 bits needed
+ typedef __duration__<boost::int_least64_t, milli> milliseconds; // at least 45 bits needed
+ typedef __duration__<boost::int_least64_t> seconds; // at least 35 bits needed
+ typedef __duration__<boost::int_least32_t, __ratio__< 60> > minutes; // at least 29 bits needed
+ typedef __duration__<boost::int_least32_t, __ratio__<3600> > hours; // at least 23 bits needed
+
+[endsect]
+
+
+[endsect]
+
+[/=============================================]
+[section:time_point_hpp Header `<boost/chrono/time_point.hpp>`]
+[/=============================================]
+
+
+ namespace boost {
+ namespace chrono {
+
+ template <class Clock, class Duration = typename Clock::duration> class __time_point__;
+
+ }
+ template <class Clock, class Duration1, class Duration2>
+ struct __common_type_spe__<__time_point__<Clock, Duration1>,
+ __time_point__<Clock, Duration2> >;
+
+ namespace chrono {
+
+ // time_point arithmetic
+ template <class Clock, class Duration1, class Rep2, class Period2>
+ time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
+ operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
+
+ template <class Rep1, class Period1, class Clock, class Duration2>
+ time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type>
+ operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs);
+
+ template <class Clock, class Duration1, class Rep2, class Period2>
+ time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
+ operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
+
+ template <class Clock, class Duration1, class Duration2>
+ typename common_type<Duration1, Duration2>::type
+ operator-(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
+ Duration2>& rhs);
+
+ // time_point comparisons
+ template <class Clock, class Duration1, class Duration2>
+ bool operator==(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class Clock, class Duration1, class Duration2>
+ bool operator!=(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class Clock, class Duration1, class Duration2>
+ bool operator< (const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class Clock, class Duration1, class Duration2>
+ bool operator<=(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class Clock, class Duration1, class Duration2>
+ bool operator> (const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class Clock, class Duration1, class Duration2>
+ bool operator>=(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+
+ // time_point_cast
+ template <class ToDuration, class Clock, class Duration>
+ time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
+
+ }
+ }
+
+
+[section:common_type_spe2 `common_type` specialization]
+
+ template <class Clock, class Duration1, class Duration2>
+ struct __common_type__<chrono::__time_point__<Clock, Duration1>, chrono::__time_point__<Clock, Duration2> >
+ {
+ typedef chrono::__time_point__<Clock, typename __common_type__<Duration1, Duration2>::type> type;
+ };
+
+The __common_type__ of two __time_point_s__ is a __time_point__ with the same `clock` (both have the same `clock`), and the __common_type__ of the two __duration_s__.
+
+[endsect]
[section:time_point Class template `time_point<>`]
@@ -3126,6 +2525,7 @@
[endsect]
[endsect]
+
[section:time_point_cast Non-Member function `time_point_cast(time_point)`]
template <class ToDuration, class Clock, class Duration>
@@ -3137,16 +2537,49 @@
[endsect]
-[section:duration_typedefs `duration` typedefs]
+[endsect]
- // convenience typedefs
- typedef __duration__<boost::int_least64_t, nano> nanoseconds; // at least 64 bits needed
- typedef __duration__<boost::int_least64_t, micro> microseconds; // at least 55 bits needed
- typedef __duration__<boost::int_least64_t, milli> milliseconds; // at least 45 bits needed
- typedef __duration__<boost::int_least64_t> seconds; // at least 35 bits needed
- typedef __duration__<boost::int_least32_t, __ratio__< 60> > minutes; // at least 29 bits needed
- typedef __duration__<boost::int_least32_t, __ratio__<3600> > hours; // at least 23 bits needed
+[/=============================================]
+[section:system_clocks_hpp Header `<boost/chrono/system_clocks.hpp>`]
+[/=============================================]
+
+ namespace boost {
+ namespace chrono {
+
+ // Clocks
+ class __system_clock__;
+ class __monotonic_clock__;
+ class __high_resolution_clock__;
+ }
+ }
+
+[section:clock `Clock` Requirements]
+
+A clock represents a bundle consisting of a native __duration__, a native __time_point__, and a function `now()` to get the current __time_point__. A clock must meet the requirements in the following Table.
+
+In this table `C1` and `C2` denote `clock` types. `t1` and `t2` are values returned from `C1::now()` where the call returning `t1` happens before the call returning `t2` and both of these calls happen before `C1::time_point::max()`.
+
+[table Clock Requirements
+ [[expression] [return type] [operational semantics]]
+ [[`C1::rep`] [An arithmetic type or class emulating an arithmetic type. ] [The representation type of the native __duration__ and __time_point__.]]
+ [[`C1::period`] [`ratio`] [The tick period of the clock in seconds.]]
+ [[`C1::duration`] [`chrono::duration<C1::rep, C1::period>`] [The native __duration__ type of the `clock`.]]
+ [[`C1::time_point`] [`chrono::time_point<C1> or chrono::time_point<C2, C1::duration>`] [The native __time_point__ type of the `clock`. Different clocks are permitted to share a __time_point__ definition if it is valid to compare their time_points by comparing their respective __duration_s__. `C1` and `C2` must refer to the same epoch.]]
+ [[`C1::is_monotonic`] [`const bool`] [`true` if `t1 <= t2` is always `true`, else `false`. *Note*: A `clock` that can be adjusted backwards is not monotonic]]
+ [[`C1::now()`] [`C1::time_point`] [Returns a __time_point__ representing the current point in time.]]
+]
+
+
+Models of Clock:
+
+* __system_clock__
+* __monotonic_clock__
+* __high_resolution_clock__
+* __process_real_cpu_clock__
+* __process_user_cpu_clock__
+* __process_system_cpu_clock__
+* __thread_clock__
[endsect]
@@ -3661,11 +3094,11 @@
[section:history Appendix A: History]
[/==================================]
-[section [*Version 0.5, September 10, 2010] ]
+[section [*Version 0.5.0, September 10, 2010] ]
[*Features:]
-* Stopwatches have been moved to a separated library: Boost.Stopwatches.
+* Stopwatches, Ratio and CommonType have been moved to separated libraries: Boost.Stopwatches, Boost.Ratio and Boost.TypeTraits.
[endsect]
@@ -4094,23 +3527,8 @@
You can also run a specific suite of test by doing
cd libs/chrono/test
- bjam __common_type__
-
-
-[section `common_type`]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[common_type_test] [run] [...] [Pass] [#]]
-]
-[endsect]
+ bjam chrono
-[section `ratio`]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[ratio_fail_test1] [compile-fails] [...] [Pass] [#]]
- [[ratio_test] [run] [...] [Pass] [#]]
-]
-[endsect]
[section chrono]
[table
@@ -4220,72 +3638,9 @@
[endsect]
-[/=====================================]
-[section:perf Appendix H: Performances]
-[/=====================================]
-
-
-We have run some program changing how the reporting is done.
-
-NONE: no report is done on the inner function
-HIGH: every call to the recursive function is reported using an stopclock
-SUSPEND: every call to the recursive function is reported using a using an stopclock on a suspendible clock
-ACCU: every call to the recursive function is tracked using a stopclock_accumulator
-
-We have run the programm with two different clocks, high_resolution_clock and thread_clock.
-
-The programs are either single-threaded or multi-threaded.
-
-Two kind of inner functions are used: recursive or non recursive. In order to test the influence of nesting reports, the non recursive functions use up to 10 nesting levels, depending on its parameter.
-
-the function at level n is defined as follows
-
- void fn(long v) {
- // reporting or not
- stopclock<> _;
- // burn some time
- for ( long i = 0; i < v; ++i )
- res+=std::sqrt( res+123.456L+i ); // burn some time
- if (v==0) return;
-
- if (v%(n-1)==0) fn-1(v-1);
- if (v%(n-2)==0) fn-2(v-1);
- ...
- f1(v-1);
- }
-
-This gives a variable number in nesting reporting depending on the parameter, with a variable lifetime.
-
-[heading Single-Threaded Recursive function]
-
-We have run the same program and changed how the reporting is done.
-
-The programm creates two thread of execution. the thread entry point calls a function which makes some calculation depending on its parameter and call recursivelly itself decreasing the parameter.
-
-NONE: no report is done on the inner function
-HIGH: every call to the recursive function is reported using an stopclock
-SUSPEND: every call to the recursive function is reported using a using an stopclock on a suspendible clock
-ACCU: every call to the recursive function is tracked using a stopclock_accumulator
-
-We have run the programm with two different clocks, high_resolution_clock and thread_clock.
-
-[heading Multi-Threaded Recursive function]
-
-We have run the same program and changed how the reporting is done.
-
-The programm creates two thread of execution. the thread entry point calls a function which makes some calculation depending on its parameter and call recursivelly itself decreasing the parameter.
-
-NONE: no report is done on the inner function
-HIGH: every call to the recursive function is reported using an stopclock
-SUSPEND: every call to the recursive function is reported using a using an stopclock on a suspendible clock
-ACCU: every call to the recursive function is tracked using a stopclock_accumulator
-
-We have run the programm with two different clocks, high_resolution_clock and thread_clock.
-
-[endsect]
[/=====================================]
-[section:todo Appendix I: Future plans]
+[section:todo Appendix H: Future plans]
[/=====================================]
[heading Tasks to do before review]
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -63,14 +63,11 @@
Acknowledgements</a></span></dt>
<dt><span class="section"> Appendix F: Tests</span></dt>
<dd><dl>
-<dt><span class="section">common_type
</span></dt>
-<dt><span class="section">ratio
</span></dt>
<dt><span class="section">chrono</span></dt>
<dt><span class="section">Other Clocks</span></dt>
</dl></dd>
<dt><span class="section"> Appendix G: Tickets</span></dt>
-<dt><span class="section"> Appendix H: Performances</span></dt>
-<dt><span class="section"> Appendix I: Future plans</span></dt>
+<dt><span class="section"> Appendix H: Future plans</span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/acknowledgements.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/acknowledgements.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/acknowledgements.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -53,8 +53,7 @@
he did concerning the documentation.
</p>
<p>
- Thansk to Jeffrey Lee Hellrung, Jr. for sharing his implementation of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> without using Boost.TypeOf.
+ Thansk to Jeffrey Lee Hellrung, Jr. for sharing his implementation of <code class="computeroutput"><span class="identifier">common_type</span></code> without using Boost.TypeOf.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -28,20 +28,16 @@
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_chrono.appendices.faq"></a> Appendix D: FAQ
</h3></div></div></div>
-<a name="boost_chrono.appendices.faq.how_important_is_the_order_of_the___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__lt__gt__template_arguments_"></a><h4>
-<a name="id5080933"></a>
- <a href="faq.html#boost_chrono.appendices.faq.how_important_is_the_order_of_the___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__lt__gt__template_arguments_">How
- important is the order of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><> template arguments?</a>
+<a name="boost_chrono.appendices.faq.how_important_is_the_order_of_the___code__phrase_role__identifier__common_type__phrase___code__lt__gt__template_arguments_"></a><h4>
+<a name="id5063632"></a>
+ <a href="faq.html#boost_chrono.appendices.faq.how_important_is_the_order_of_the___code__phrase_role__identifier__common_type__phrase___code__lt__gt__template_arguments_">How
+ important is the order of the <code class="computeroutput"><span class="identifier">common_type</span></code><>
+ template arguments?</a>
</h4>
<p>
- The order of the template parameters is important. First <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><> is not able
- to find out common type if it is not present and second <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><A,B,C>::type is
- equivalent to <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a>< <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><A,B>::type, C>::type.
+ The order of the template parameters is important. First <code class="computeroutput"><span class="identifier">common_type</span></code><>
+ is not able to find out common type if it is not present and second <code class="computeroutput"><span class="identifier">common_type</span></code><A,B,C>::type is equivalent
+ to <code class="computeroutput"><span class="identifier">common_type</span></code>< <code class="computeroutput"><span class="identifier">common_type</span></code><A,B>::type, C>::type.
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{};</span>
@@ -55,22 +51,18 @@
<span class="special">};</span>
<span class="preprocessor">#if</span> <span class="number">0</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">,</span> <span class="identifier">C</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">ABC</span><span class="special">;</span> <span class="comment">// DO not compile
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">,</span> <span class="identifier">C</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">ABC</span><span class="special">;</span> <span class="comment">// DO not compile
</span><span class="preprocessor">#else</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">C</span><span class="special">,</span> <span class="identifier">B</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">ABC</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">C</span><span class="special">,</span> <span class="identifier">B</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">ABC</span><span class="special">;</span>
<span class="preprocessor">#endif</span>
</pre>
<p>
- Thus, as <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><A,B>::type is
- undefined, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><A,B,C>::type is
- also undefined.
+ Thus, as <code class="computeroutput"><span class="identifier">common_type</span></code><A,B>::type
+ is undefined, <code class="computeroutput"><span class="identifier">common_type</span></code><A,B,C>::type
+ is also undefined.
</p>
<a name="boost_chrono.appendices.faq.why_does_stopwatch_reporter_only_display_millisecond_place_precision_when_the_underlying_clock_has_nanosecond_precision_"></a><h4>
-<a name="id5081486"></a>
+<a name="id5064130"></a>
<a href="faq.html#boost_chrono.appendices.faq.why_does_stopwatch_reporter_only_display_millisecond_place_precision_when_the_underlying_clock_has_nanosecond_precision_">Why
does stopwatch_reporter only display millisecond place precision when the
underlying Clock has nanosecond precision?</a>
@@ -81,7 +73,7 @@
dangerously.
</p>
<a name="boost_chrono.appendices.faq.why_does_stopwatch_reporter_sometimes_report_more_cpu_seconds_than_real_seconds_"></a><h4>
-<a name="id5081527"></a>
+<a name="id5064170"></a>
<a href="faq.html#boost_chrono.appendices.faq.why_does_stopwatch_reporter_sometimes_report_more_cpu_seconds_than_real_seconds_">Why
does stopwatch_reporter sometimes report more cpu seconds than real seconds?</a>
</h4>
@@ -91,7 +83,7 @@
be reporting at times.
</p>
<a name="boost_chrono.appendices.faq.can_i_obtain_statistics_of_the_time_elapsed_between_calls_to_a_function_"></a><h4>
-<a name="id5081560"></a>
+<a name="id5064203"></a>
<a href="faq.html#boost_chrono.appendices.faq.can_i_obtain_statistics_of_the_time_elapsed_between_calls_to_a_function_">Can
I obtain statistics of the time elapsed between calls to a function?</a>
</h4>
@@ -99,26 +91,24 @@
The library do not provides this feature.
</p>
<a name="boost_chrono.appendices.faq.what_happens_if_i_press_ctrl_c_and_program_terminates__what_log_would_boost_chrono_output_"></a><h4>
-<a name="id5081588"></a>
+<a name="id5064231"></a>
<a href="faq.html#boost_chrono.appendices.faq.what_happens_if_i_press_ctrl_c_and_program_terminates__what_log_would_boost_chrono_output_">What
happens if I press Ctrl+C and program terminates? What log would Boost.chrono
output?</a>
</h4>
-<a name="boost_chrono.appendices.faq.can_you_explain_the_pros_cons_of___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__against_boost_typeof_"></a><h4>
-<a name="id5081617"></a>
- <a href="faq.html#boost_chrono.appendices.faq.can_you_explain_the_pros_cons_of___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__against_boost_typeof_">Can
- you explain the pros/cons of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> against Boost.Typeof?</a>
+<a name="boost_chrono.appendices.faq.can_you_explain_the_pros_cons_of___code__phrase_role__identifier__common_type__phrase___code__against_boost_typeof_"></a><h4>
+<a name="id5064259"></a>
+ <a href="faq.html#boost_chrono.appendices.faq.can_you_explain_the_pros_cons_of___code__phrase_role__identifier__common_type__phrase___code__against_boost_typeof_">Can
+ you explain the pros/cons of <code class="computeroutput"><span class="identifier">common_type</span></code>
+ against Boost.Typeof?</a>
</h4>
<p>
- Even if in a first look they sound to be close, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> and typeof have different
- purposes. You use typeof to get the type of an expression, while you use
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> to set explicitly the
- type returned of a template function. Both are complementary. For example
- with the preceding declaration and the needed Typeof registrations, you can
- do
+ Even if in a first look they sound to be close, <code class="computeroutput"><span class="identifier">common_type</span></code>
+ and typeof have different purposes. You use typeof to get the type of an
+ expression, while you use <code class="computeroutput"><span class="identifier">common_type</span></code>
+ to set explicitly the type returned of a template function. Both are complementary.
+ For example with the preceding declaration and the needed Typeof registrations,
+ you can do
</p>
<p>
Suppose I have a mixed type vector2 class with a magnitude_squared function
@@ -130,14 +120,13 @@
v.x + v.y * v.y; }
</p>
<p>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> is closer in nature
- to promote_args<class ...T> in boost/math/tools/promotion.hpp than
- it is to Boost.Typeof, though it is not exactly the same as promote_args
- either. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><T1, T2>::type
- simply represents the result of some operation on T1 and T2, and defaults
- to the type obtained by putting T1 and T2 into a conditional statement.
+ <code class="computeroutput"><span class="identifier">common_type</span></code> is closer in
+ nature to promote_args<class ...T> in boost/math/tools/promotion.hpp
+ than it is to Boost.Typeof, though it is not exactly the same as promote_args
+ either. <code class="computeroutput"><span class="identifier">common_type</span></code><T1,
+ T2>::type simply represents the result of some operation on T1 and T2,
+ and defaults to the type obtained by putting T1 and T2 into a conditional
+ statement.
</p>
<p>
It is meant to be customizable (via specialization) if this default is not
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -61,7 +61,8 @@
<span class="bold"><strong>Features:</strong></span>
</p>
<div class="itemizedlist"><ul type="disc"><li>
- Stopwatches have been moved to a separated library: Boost.Stopwatches.
+ Stopwatches, Ratio and CommonType have been moved to separated libraries:
+ Boost.Stopwatches, Boost.Ratio and Boost.TypeTraits.
</li></ul></div>
</div>
<div class="section" lang="en">
@@ -84,9 +85,8 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Implementation of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> without using
- Boost.TypeOf.
+ Implementation of <code class="computeroutput"><span class="identifier">common_type</span></code>
+ without using Boost.TypeOf.
</li>
<li>
Added __stopwatch_accumulator_time<span class="underline">formatter</span>_
@@ -249,7 +249,7 @@
</li>
<li>
Added <code class="computeroutput"><span class="identifier">scope_suspend</span></code>
- which do <code class="computeroutput"><span class="identifier">suspend</span></code>/<code class="computeroutput"><span class="identifier">resume</span></code> if the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ which do <code class="computeroutput"><span class="identifier">suspend</span></code>/<code class="computeroutput"><span class="identifier">resume</span></code> if the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code></a> is a model of <code class="computeroutput"><span class="identifier">SuspendibleClock</span></code> concept, and nothing
otherwise.
</li>
@@ -419,8 +419,8 @@
</li>
<li>
Added <code class="computeroutput"><span class="identifier">typeof</span></code> registration
- for classes <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ for classes <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>
</li>
<li>
@@ -536,32 +536,31 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Added <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> construction and assignment
- from an equivalent <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> (<a href="http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281" target="_top"><span class="bold"><strong>LWG 1281. CopyConstruction and Assignment between ratios
+ Added <code class="computeroutput"><span class="identifier">ratio</span></code> construction
+ and assignment from an equivalent <code class="computeroutput"><span class="identifier">ratio</span></code>
+ (<a href="http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281" target="_top"><span class="bold"><strong>LWG 1281. CopyConstruction and Assignment between ratios
having the same normalized form</strong></span></a>)
</li>
<li>
- Added nested <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> typedef type (<a href="http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281" target="_top"><span class="bold"><strong>LWG 1281. CopyConstruction and Assignment between ratios
+ Added nested <code class="computeroutput"><span class="identifier">ratio</span></code>
+ typedef type (<a href="http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281" target="_top"><span class="bold"><strong>LWG 1281. CopyConstruction and Assignment between ratios
having the same normalized form</strong></span></a>)
</li>
<li>
Added __BOOST_CHRONO_HAS_CLOCK<span class="underline">MONOTONIC</span>_
- macro to state if <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ macro to state if <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a> is provided
on this platform.
</li>
<li>
- Added <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Added <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <code class="computeroutput"><span class="keyword">operator</span><span class="special">%</span></code> (LGW 934. duration is missing operator%)
</li>
<li>
Added BOOST_CHRONO_CONSTEXPR when constexpr should be used.
</li>
<li>
- Complete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Complete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <code class="computeroutput"><span class="keyword">operator</span><span class="special">*</span></code> and <code class="computeroutput"><span class="keyword">operator</span><span class="special">/</span></code>.
</li>
</ul></div>
@@ -620,12 +619,12 @@
<li>
result of metafunctions <code class="computeroutput"><span class="identifier">ratio_multiply</span></code>
and <code class="computeroutput"><span class="identifier">ratio_divide</span></code> were
- not normalized ratios: Use of the nested <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> typedef type on <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> arithmetic operations.
+ not normalized ratios: Use of the nested <code class="computeroutput"><span class="identifier">ratio</span></code>
+ typedef type on <code class="computeroutput"><span class="identifier">ratio</span></code>
+ arithmetic operations.
</li>
<li>
- Copy constructor from similar <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Copy constructor from similar <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> masked the defaulted
operations: Added duration defaulted implementations
</li>
@@ -642,8 +641,7 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- The C++0x Standard Library's <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a>.
+ The C++0x Standard Library's <code class="computeroutput"><span class="identifier">common_type</span></code>.
</li>
<li>
The C++0x Standard Library's compile-time rational arithmetic.
@@ -652,11 +650,11 @@
The C++0x Standard Library's time utilities, including:
<div class="itemizedlist"><ul type="circle">
<li>
- Class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>
</li>
<li>
- Class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ Class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>
</li>
<li>
@@ -666,7 +664,7 @@
<code class="computeroutput"><span class="identifier">system_clock</span></code>
</li>
<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a>
</li>
<li>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -69,7 +69,7 @@
with a variable lifetime.
</p>
<a name="boost_chrono.appendices.perf.single_threaded_recursive_function"></a><h4>
-<a name="id5084707"></a>
+<a name="id5067396"></a>
<a href="perf.html#boost_chrono.appendices.perf.single_threaded_recursive_function">Single-Threaded
Recursive function</a>
</h4>
@@ -92,7 +92,7 @@
and thread_clock.
</p>
<a name="boost_chrono.appendices.perf.multi_threaded_recursive_function"></a><h4>
-<a name="id5084756"></a>
+<a name="id5067445"></a>
<a href="perf.html#boost_chrono.appendices.perf.multi_threaded_recursive_function">Multi-Threaded
Recursive function</a>
</h4>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -32,10 +32,10 @@
and provides motivation for key design decisions. The following sections
are an extract from this document.
</p>
-<a name="boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a___link_linkend__boost_chrono_reference_cpp0x_chrono_chrono_hpp_duration___code__phrase_role__identifier__duration__phrase___code___link__to_a_function_with_the_units_being_ambiguous_"></a><h4>
-<a name="id5079563"></a>
- <a href="rationale.html#boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a___link_linkend__boost_chrono_reference_cpp0x_chrono_chrono_hpp_duration___code__phrase_role__identifier__duration__phrase___code___link__to_a_function_with_the_units_being_ambiguous_">Is
- it possible for the user to pass a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<a name="boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a___link_linkend__boost_chrono_reference_cpp0x_duration_hpp_duration___code__phrase_role__identifier__duration__phrase___code___link__to_a_function_with_the_units_being_ambiguous_"></a><h4>
+<a name="id5062329"></a>
+ <a href="rationale.html#boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a___link_linkend__boost_chrono_reference_cpp0x_duration_hpp_duration___code__phrase_role__identifier__duration__phrase___code___link__to_a_function_with_the_units_being_ambiguous_">Is
+ it possible for the user to pass a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> to a function with the
units being ambiguous?</a>
</h4>
@@ -46,7 +46,7 @@
<pre class="programlisting"><span class="identifier">f</span><span class="special">(</span><span class="number">3</span><span class="special">);</span> <span class="comment">// Will not compile, 3 is not implicitly convertible to any __duration__
</span></pre>
<a name="boost_chrono.appendices.rationale.why_duration_needs_operator_"></a><h4>
-<a name="id5079663"></a>
+<a name="id5062427"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_duration_needs_operator_">Why
duration needs operator%</a>
</h4>
@@ -74,7 +74,7 @@
<span class="special">};</span>
</pre>
<a name="boost_chrono.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form"></a><h4>
-<a name="id5080243"></a>
+<a name="id5063007"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form">Why
ratio needs CopyConstruction and Assignment from ratios having the same normalized
form</a>
@@ -86,30 +86,23 @@
<p>
This simple example
</p>
-<pre class="programlisting"><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">></span> <span class="identifier">r1</span><span class="special">;</span>
-<a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">></span> <span class="identifier">r2</span><span class="special">;</span>
+<pre class="programlisting"><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">></span> <span class="identifier">r1</span><span class="special">;</span>
+<code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">></span> <span class="identifier">r2</span><span class="special">;</span>
<span class="identifier">r1</span> <span class="special">=</span> <span class="identifier">r2</span><span class="special">;</span> <span class="comment">// (1)
</span></pre>
<p>
fails to compile in (1). Other example
</p>
-<pre class="programlisting"><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">></span> <span class="identifier">r1</span><span class="special">;</span>
-<span class="identifier">ratio_substract</span><span class="special"><</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">>,</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">></span> <span class="special">></span> <span class="identifier">r2</span><span class="special">=</span><span class="identifier">r1</span><span class="special">;</span> <span class="comment">// (2)
+<pre class="programlisting"><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">></span> <span class="identifier">r1</span><span class="special">;</span>
+<span class="identifier">ratio_substract</span><span class="special"><</span><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">>,</span><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">></span> <span class="special">></span> <span class="identifier">r2</span><span class="special">=</span><span class="identifier">r1</span><span class="special">;</span> <span class="comment">// (2)
</span></pre>
<p>
- The type of ratio<span class="underline">substract<</span><span class="underline">ratio</span><span class="underline"><2,3>,</span><span class="underline">ratio</span>_<1,3> > could be <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><3,9> so the compilation
- could fail in (2). It could also be <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><1,3> and the compilation
- succeeds.
+ The type of ratio<span class="underline">substract<</span><span class="underline">ratio</span><span class="underline"><2,3>,</span><span class="underline">ratio</span>_<1,3> > could be <code class="computeroutput"><span class="identifier">ratio</span></code><3,9> so the compilation could
+ fail in (2). It could also be <code class="computeroutput"><span class="identifier">ratio</span></code><1,3>
+ and the compilation succeeds.
</p>
<a name="boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type"></a><h4>
-<a name="id5080653"></a>
+<a name="id5063376"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type">Why
ratio needs the nested normalizer typedef type</a>
</h4>
@@ -117,26 +110,22 @@
In N3000 20.4.2 and similar clauses
</p>
<p>
- <span class="emphasis"><em>3 The nested typedef type shall be a synonym for <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><T1, T2> where T1 has
- the value R1::num * R2::den - R2::num * R1::den and T2 has the value R1::den
- * R2::den.</em></span>
+ <span class="emphasis"><em>3 The nested typedef type shall be a synonym for <code class="computeroutput"><span class="identifier">ratio</span></code><T1, T2> where T1 has the value
+ R1::num * R2::den - R2::num * R1::den and T2 has the value R1::den * R2::den.</em></span>
</p>
<p>
The meaning of synonym let think that the result should be a normalized ratio
- equivalent to <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><T1, T2>, but there is
- not an explicit definition of what synonym means in this context.
+ equivalent to <code class="computeroutput"><span class="identifier">ratio</span></code><T1,
+ T2>, but there is not an explicit definition of what synonym means in
+ this context.
</p>
<p>
If the CopyConstruction and Assignment ([LWG 1281) is not added we need a typedef for
accessing the normalized ratio, and change 20.4.2 to return only this normalized
result. In this case the user will need to
</p>
-<pre class="programlisting"><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">r1</span><span class="special">;</span>
-<a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">r2</span><span class="special">;</span>
+<pre class="programlisting"><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">r1</span><span class="special">;</span>
+<code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">r2</span><span class="special">;</span>
<span class="identifier">r1</span> <span class="special">=</span> <span class="identifier">r2</span><span class="special">;</span> <span class="comment">// compiles as both types are the same.
</span></pre>
</div>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tests.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tests.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tests.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -28,8 +28,6 @@
<a name="boost_chrono.appendices.tests"></a> Appendix F: Tests
</h3></div></div></div>
<div class="toc"><dl>
-<dt><span class="section">common_type
</span></dt>
-<dt><span class="section">ratio
</span></dt>
<dt><span class="section">chrono</span></dt>
<dt><span class="section">Other Clocks</span></dt>
</dl></div>
@@ -42,176 +40,10 @@
You can also run a specific suite of test by doing
</p>
<pre class="programlisting"><span class="identifier">cd</span> <span class="identifier">libs</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">test</span>
-<span class="identifier">bjam</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a>
+<span class="identifier">bjam</span> <span class="identifier">chrono</span>
</pre>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.appendices.tests._common_type_"></a>common_type
-</h4></div></div></div>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
- <p>
- kind
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-<th>
- <p>
- Result
- </p>
- </th>
-<th>
- <p>
- Ticket
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- common_type_test
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- ...
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.appendices.tests._ratio_"></a>ratio
-</h4></div></div></div>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
- <p>
- kind
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-<th>
- <p>
- Result
- </p>
- </th>
-<th>
- <p>
- Ticket
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- ratio_fail_test1
- </p>
- </td>
-<td>
- <p>
- compile-fails
- </p>
- </td>
-<td>
- <p>
- ...
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- ratio_test
- </p>
- </td>
-<td>
- <p>
- run
- </p>
- </td>
-<td>
- <p>
- ...
- </p>
- </td>
-<td>
- <p>
- Pass
- </p>
- </td>
-<td>
- <p>
- #
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
<a name="boost_chrono.appendices.tests.chrono"></a>chrono
</h4></div></div></div>
<div class="informaltable"><table class="table">
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tickets.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tickets.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/tickets.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -7,7 +7,7 @@
<link rel="start" href="../../index.html" title="Boost.Chrono">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="tests.html" title=" Appendix F: Tests">
-<link rel="next" href="perf.html" title=" Appendix H: Performances">
+<link rel="next" href="todo.html" title=" Appendix H: Future plans">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="tests.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="perf.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="tests.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -712,7 +712,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="tests.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="perf.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="tests.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -1,12 +1,12 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title> Appendix I: Future plans</title>
+<title> Appendix H: Future plans</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="../../index.html" title="Boost.Chrono">
<link rel="up" href="../appendices.html" title="Appendices">
-<link rel="prev" href="perf.html" title=" Appendix H: Performances">
+<link rel="prev" href="tickets.html" title=" Appendix G: Tickets">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -19,14 +19,14 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="perf.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="tickets.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="boost_chrono.appendices.todo"></a> Appendix I: Future plans
+<a name="boost_chrono.appendices.todo"></a> Appendix H: Future plans
</h3></div></div></div>
<a name="boost_chrono.appendices.todo.tasks_to_do_before_review"></a><h4>
-<a name="id5084822"></a>
+<a name="id5066516"></a>
<a href="todo.html#boost_chrono.appendices.todo.tasks_to_do_before_review">Tasks
to do before review</a>
</h4>
@@ -42,7 +42,7 @@
</li>
</ul></div>
<a name="boost_chrono.appendices.todo.for_later_releases"></a><h4>
-<a name="id5084872"></a>
+<a name="id5066565"></a>
<a href="todo.html#boost_chrono.appendices.todo.for_later_releases">For later
releases</a>
</h4>
@@ -51,8 +51,7 @@
Use of C++0x feature constexpr, when available.
</li>
<li>
- Define a C++98 variadic template emmulation of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a>
+ Define a C++98 variadic template emmulation of <code class="computeroutput"><span class="identifier">common_type</span></code>
</li>
</ul></div>
</div>
@@ -66,7 +65,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="perf.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="tickets.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
</div>
</body>
</html>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -31,68 +31,41 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- A means to represent time durations: managed by the generic <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ A means to represent time durations: managed by the generic <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> class . Examples of
- time durations include <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">days</span></code></a>, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a>, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ time durations include <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">days</span></code></a>, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a>, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>, which can be represented
with a fixed number of clock ticks per unit. All of these units of time
- duration are united with a generic interface by the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ duration are united with a generic interface by the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> facility.
</li>
<li>
- A type for representing points in time: <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>. A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ A type for representing points in time: <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>. A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> represents an epoch
- plus or minus a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ plus or minus a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>. The library leaves
- epochs unspecified. A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ epochs unspecified. A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> is associated with
a <span class="emphasis"><em>clock</em></span>.
</li>
<li>
Several clocks, some of which may not be available on a particular platform:
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a>, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
- Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a>, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
+ Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a>. A clock
- is a pairing of a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ is a pairing of a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, and a function which
- returns a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ returns a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> representing <span class="emphasis"><em>now</em></span>.
</li>
</ul></div>
<p>
- Additionally, a minimal amount of general purpose infrastructure is provided
- which will support both the interface and implementation of the <span class="emphasis"><em>clocks</em></span>,
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> proposed herein. It is
- expected that these general purpose facilities will also find utility in
- far ranging user applications as well.
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> is a traits class
- used to deduce a type common to a several types, useful as the return
- type of functions operating on multiple input types such as in mixed-mode
- arithmetic.
- </li>
-<li>
- A class template, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a>, for specifying compile
- time rational constants such as 1/3 of a nanosecond or the number of
- inches per meter. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> represents a compile time
- ratio of compile time constants with support for compile time arithmetic
- with overflow and division by zero protection
- </li>
-</ul></div>
-<p>
To make the timing facilities more generally useful, <span class="bold"><strong>Boost.Chrono</strong></span>
provides a number of clocks that are thin wrappers around the operating system's
time APIs, thereby allowing the extraction of read (wall clock) time, user
@@ -124,13 +97,13 @@
</ul></div>
<p>
Lastly, <span class="bold"><strong>Boost.Chrono</strong></span> includes typeof
- registration for <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ registration for <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> to permit using emulated
auto with C++03 compilers.
</p>
<a name="boost_chrono.overview.description.caveat_emptor"></a><h4>
-<a name="id4949556"></a>
+<a name="id4949434"></a>
<a href="description.html#boost_chrono.overview.description.caveat_emptor">Caveat emptor</a>
</h4>
<p>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -31,12 +31,15 @@
<dt><span class="section"><a href="reference/cpp0x.html"> Included on the C++0x
recommendation</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp"> Header
- <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">common_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"> Header <boost/ratio.hpp>
</span></dt>
<dt><span class="section"> Header <boost/chrono.hpp>
</span></dt>
<dt><span class="section"><a href="reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp"> Header
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">duration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">time_point</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">system_clocks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dt><span class="section"><a href="reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_typeof_hpp"> Header
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">typeof</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
</dl></dd>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -30,1077 +30,254 @@
recommendation</a>
</h3></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp"> Header
- <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">common_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.conf">
- Configuration macros</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.pp">
- Preprocessor info</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type">
- Class Template <code class="computeroutput"><span class="identifier">common_type</span><span class="special"><></span></code></a></span></dt>
-</dl></dd>
-<dt><span class="section"> Header <boost/ratio.hpp>
</span></dt>
-<dd><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.conf"> Configuration
- macros</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio"> Class
- Template <code class="computeroutput"><span class="identifier">ratio</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic">
- <code class="computeroutput"><span class="identifier">ratio</span></code> arithmetic</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison">
- <code class="computeroutput"><span class="identifier">ratio</span></code> comparison</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs">
- SI typedefs</a></span></dt>
-</dl></dd>
-<dt><span class="section"> Header <boost/chrono.hpp>
</span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp"> Header
- <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf">
- Configuration macros</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock">
- <code class="computeroutput"><span class="identifier">Clock</span></code> Requirements</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits">
- Time-related traits</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.common_type_spe">
- <code class="computeroutput"><span class="identifier">common_type</span></code> specializations</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration">
- Class template <code class="computeroutput"><span class="identifier">duration</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section">duration
non-member arithmetic</span></dt>
-<dt><span class="section">duration
Non-Member comparaisons</span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast">
- Non-Member function <code class="computeroutput"><span class="identifier">duration_cast</span><span class="special">(</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point">
- Class template <code class="computeroutput"><span class="identifier">time_point</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section">time_point
non-member arithmetic</span></dt>
-<dt><span class="section">time_point
non-member comparisons</span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point_cast">
- Non-Member function <code class="computeroutput"><span class="identifier">time_point_cast</span><span class="special">(</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs">
- <code class="computeroutput"><span class="identifier">duration</span></code> typedefs</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock">
- Class <code class="computeroutput"><span class="identifier">system_clock</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC">
- Macro <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock">
- Class <code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock">
- Class <code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_typeof_hpp"> Header
- <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">typeof</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-</dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.cpp0x.common_type_hpp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp" title=" Header
- <boost/type_traits/common_type.hpp>"> Header
- <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">common_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.conf">
- Configuration macros</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.pp">
- Preprocessor info</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type">
- Class Template <code class="computeroutput"><span class="identifier">common_type</span><span class="special"><></span></code></a></span></dt>
-</dl></div>
-<pre class="programlisting"><span class="comment">// configuration macros
-</span><span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.conf" title="
- Configuration macros"><code class="computeroutput"><span class="identifier">BOOST_COMMON_TYPE_USES_STATIC_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.conf" title="
- Configuration macros"><code class="computeroutput"><span class="identifier">BOOST_COMMON_TYPE_USES_MPL_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.conf" title="
- Configuration macros"><code class="computeroutput"><span class="identifier">BOOST_COMMON_TYPE_USES_ARRAY_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.pp" title="
- Preprocessor info"><code class="computeroutput"><span class="identifier">BOOST_COMMON_TYPE_DONT_USE_TYPEOF</span></code></a>
-
-<span class="comment">// preprocessor info
-</span><span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.pp" title="
- Preprocessor info"><code class="computeroutput"><span class="identifier">BOOST_COMMON_TYPE_ARITY</span></code></a>
-
-<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="special">...</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.common_type_hpp.conf"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.conf" title="
- Configuration macros">
- Configuration macros</a>
-</h5></div></div></div>
-<p>
- When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static
- assertions are reported. Define
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- BOOST_COMMON_TYPE_USES_STATIC_ASSERT: define it if you want to use
- Boost.StaticAssert
- </li>
-<li>
- BOOST_COMMON_TYPE_USES_MPL_ASSERT: define it if you want to use Boost.MPL
- static asertions
- </li>
-<li>
- BOOST_COMMON_TYPE_USES_ARRAY_ASSERT: define it if you want to use
- internal static asertions
- </li>
-<li>
- nothing if you don't want static asertions
- </li>
-</ul></div>
-<p>
- When BOOST_COMMON_TYPE_USES_MPL_ASSERT is not defined the following symbols
- are defined as
- </p>
-<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_COMMON_TYPE_MUST_BE_A_COMPLETE_TYPE</span> <span class="special">\</span>
- <span class="string">"must be complete type"</span>
-</pre>
-<p>
- Depending on the static assertion used system you will have an hint of
- the failing assertion either through the symbol or through the texte.
- </p>
-<p>
- When BOOST_NO_DECLTYPE is not defined common_type is implemented using
- decltype. Otherwise when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined
- it uses Boost.TypeOf.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.common_type_hpp.pp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.pp" title="
- Preprocessor info">
- Preprocessor info</a>
-</h5></div></div></div>
-<p>
- When BOOST_NO_VARIADIC_TEMPLATES is defined BOOST_COMMON_TYPE_ARITY gives
- the maximum number of template parameters for <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a>.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.common_type_hpp.common_type"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>">
- Class Template <code class="computeroutput"><span class="identifier">common_type</span><span class="special"><></span></code></a>
-</h5></div></div></div>
-<p>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> is a traits class
- used to deduce a type common to a several types, useful as the return
- type of functions operating on multiple input types such as in mixed-mode
- arithmetic..
- </p>
-<p>
- The nested typedef <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a>::type` could be
- defined as follows:
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span> <span class="special">=</span> <span class="keyword">void</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span> <span class="special">=</span> <span class="keyword">void</span><span class="special">></span>
-<span class="keyword">struct</span> <span class="identifier">common_type</span> <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">U</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">V</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">struct</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span> <span class="keyword">void</span><span class="special">,</span> <span class="keyword">void</span><span class="special">></span> <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
-<span class="keyword">struct</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">U</span><span class="special">,</span> <span class="keyword">void</span><span class="special">></span> <span class="special">{</span>
-<span class="keyword">private</span><span class="special">:</span>
- <span class="keyword">static</span> <span class="identifier">T</span> <span class="identifier">m_t</span><span class="special">();</span>
- <span class="keyword">static</span> <span class="identifier">U</span> <span class="identifier">m_u</span><span class="special">();</span>
- <span class="keyword">static</span> <span class="keyword">bool</span> <span class="identifier">m_f</span><span class="special">();</span> <span class="comment">// workaround gcc bug; not required by std
-</span><span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">typedef</span> <span class="identifier">BOOST_TYPEOF_TPL</span><span class="special">(</span><span class="identifier">m_f</span><span class="special">()</span> <span class="special">?</span> <span class="identifier">m_t</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">m_u</span><span class="special">())</span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<p>
- All parameter types must be complete. This trait is permitted to be specialized
- by a user if at least one template parameter is a user-defined type.
- </p>
-<p>
- <span class="bold"><strong>Note:</strong></span> Such specializations are required
- when only explicit conversions are desired among the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> arguments.
- </p>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.cpp0x.ratio_hpp"></a> Header <boost/ratio.hpp>
-</h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.conf"> Configuration
- macros</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio"> Class
- Template <code class="computeroutput"><span class="identifier">ratio</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic">
- <code class="computeroutput"><span class="identifier">ratio</span></code> arithmetic</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison">
- <code class="computeroutput"><span class="identifier">ratio</span></code> comparison</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs">
- SI typedefs</a></span></dt>
-</dl></div>
-<p>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> is a facility which is useful
- in specifying compile time rational constants. Compile time rational arithmetic
- is supported with protection against overflow and divide by zero. Such
- a facility is very handy when needing to efficiently represent 1/3 of a
- nanosecond, or specifying an inch in terms of meters (for example 254/10000
- meters - which <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> will reduce to 127/5000
- meters).
- </p>
-<pre class="programlisting"><span class="comment">// configuration macros
-</span><span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.conf" title=" Configuration
- macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_STATIC_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.conf" title=" Configuration
- macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_MPL_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.conf" title=" Configuration
- macros"><code class="computeroutput"><span class="identifier">BOOST_RATIO_USES_ARRAY_ASSERT</span></code></a>
-
-<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">N</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">D</span> <span class="special">=</span> <span class="number">1</span><span class="special">></span> <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">;</span>
-
- <span class="comment">// ratio arithmetic
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_add</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_subtract</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_multiply</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic"><code class="computeroutput"><span class="identifier">ratio_divide</span></code></a><span class="special">;</span>
-
- <span class="comment">// ratio comparison
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_equal</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_not_equal</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_less</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_less_equal</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_greater</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison" title="
- ratio comparison"><code class="computeroutput"><span class="identifier">ratio_greater_equal</span></code></a><span class="special">;</span>
-
- <span class="comment">// convenience SI typedefs
-</span> <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000000LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">atto</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">femto</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">pico</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">nano</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">micro</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">milli</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">100LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">centi</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">10LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">deci</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">10LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">deca</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">100LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">hecto</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">1000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">kilo</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">1000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">mega</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">1000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">giga</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">1000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">tera</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">1000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">peta</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">1000000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">exa</span></code></a><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.ratio_hpp.conf"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.conf" title=" Configuration
- macros"> Configuration
- macros</a>
-</h5></div></div></div>
-<p>
- When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static
- assertions are reported. Define
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- BOOST_RATIO_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
- </li>
-<li>
- BOOST_RATIO_USES_MPL_ASSERT: define it if you want to use Boost.MPL
- static asertions
- </li>
-<li>
- BOOST_RATIO_USES_ARRAY_ASSERT: define it if you want to use internal
- static asertions
- </li>
-<li>
- nothing if you don't want static asertions
- </li>
-</ul></div>
-<p>
- When BOOST_RATIO_USES_MPL_ASSERT is not defined the following symbols
- are defined as
- </p>
-<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_ADD</span> <span class="string">"overflow in ratio add"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_SUB</span> <span class="string">"overflow in ratio sub"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_MUL</span> <span class="string">"overflow in ratio mul"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_OVERFLOW_IN_DIV</span> <span class="string">"overflow in ratio div"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_RATIO_NUMERATOR_IS_OUT_OF_RANGE</span> <span class="string">"ratio numerator is out of range"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_RATIO_DIVIDE_BY_0</span> <span class="string">"ratio divide by 0"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_RATIO_RATIO_DENOMINATOR_IS_OUT_OF_RANGE</span> <span class="string">"ratio denominator is out of range"</span>
-</pre>
-<p>
- Depending on the static assertion used system you will have an hint of
- the failing assertion either through the symbol or through the texte.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.ratio_hpp.ratio"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"> Class
- Template <code class="computeroutput"><span class="identifier">ratio</span><span class="special"><></span></code></a>
-</h5></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio.ca">
- Construction and assignment</a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">N</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">D</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">ratio</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">intmax_t</span> <span class="identifier">den</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">ratio</span><span class="special"><</span><span class="identifier">num</span><span class="special">,</span> <span class="identifier">den</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
-
- <span class="identifier">ratio</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">default</span><span class="special">;</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="identifier">intmax_t</span> <span class="identifier">_N2</span><span class="special">,</span> <span class="identifier">intmax_t</span> <span class="identifier">_D2</span><span class="special">></span>
- <span class="identifier">ratio</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ratio</span><span class="special"><</span><span class="identifier">_N2</span><span class="special">,</span> <span class="identifier">_D2</span><span class="special">>&);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="identifier">intmax_t</span> <span class="identifier">_N2</span><span class="special">,</span> <span class="identifier">intmax_t</span> <span class="identifier">_D2</span><span class="special">></span>
- <span class="identifier">ratio</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">ratio</span><span class="special"><</span><span class="identifier">_N2</span><span class="special">,</span> <span class="identifier">_D2</span><span class="special">>&)</span> <span class="special">{</span><span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;}</span>
-<span class="special">};</span>
-</pre>
-<p>
- A diagnostic will be emitted if <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> is instantiated with
- <code class="computeroutput"><span class="identifier">D</span> <span class="special">==</span>
- <span class="number">0</span></code>, or if the absolute value of
- <code class="computeroutput"><span class="identifier">N</span></code> or <code class="computeroutput"><span class="identifier">D</span></code>
- can not be represented. <span class="bold"><strong>Note:</strong></span> These
- rules ensure that infinite ratios are avoided and that for any negative
- input, there exists a representable value of its absolute value which
- is positive. In a two's complement representation, this excludes the
- most negative value.
- </p>
-<p>
- Let <code class="computeroutput"><span class="identifier">gcd</span></code> denote the greatest
- common divisor of <code class="computeroutput"><span class="identifier">N</span></code>'s
- absolute value and of <code class="computeroutput"><span class="identifier">D</span></code>'s
- absolute value.
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- <code class="computeroutput"><span class="identifier">num</span></code> has the value
- <code class="computeroutput"><span class="identifier">sign</span><span class="special">(</span><span class="identifier">N</span><span class="special">)*</span><span class="identifier">sign</span><span class="special">(</span><span class="identifier">D</span><span class="special">)*</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">N</span><span class="special">)/</span><span class="identifier">gcd</span></code>.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">den</span></code> has the value
- <code class="computeroutput"><span class="identifier">abs</span><span class="special">(</span><span class="identifier">D</span><span class="special">)/</span><span class="identifier">gcd</span></code>.
- </li>
-</ul></div>
-<p>
- The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
- denotes the normalized form of this <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> type. It should be used
- when the template parameters doesn't give a normalized form.
- </p>
-<p>
- Two <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> classes <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">N1</span><span class="special">,</span><span class="identifier">D1</span><span class="special">></span></code>
- and <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">N2</span><span class="special">,</span><span class="identifier">D2</span><span class="special">></span></code>
- have the same normalized form if <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">N1</span><span class="special">,</span><span class="identifier">D1</span><span class="special">>::</span><span class="identifier">type</span></code> is the same type as <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">N2</span><span class="special">,</span><span class="identifier">D2</span><span class="special">>::</span><span class="identifier">type</span></code>
- </p>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.ratio_hpp.ratio.ca"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio.ca" title="
- Construction and assignment">
- Construction and assignment</a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="identifier">intmax_t</span> <span class="identifier">N2</span><span class="special">,</span> <span class="identifier">intmax_t</span> <span class="identifier">D2</span><span class="special">></span>
- <span class="identifier">ratio</span><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">N2</span><span class="special">,</span> <span class="identifier">D2</span><span class="special">>&</span> <span class="identifier">r</span><span class="special">);</span>
-</pre>
-<p>
- <span class="bold"><strong>Effects:</strong></span> Constructs a <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> object.
- </p>
-<p>
- <span class="bold"><strong>Remarks:</strong></span> This constructor will not
- participate in overload resolution unless <code class="computeroutput"><span class="identifier">r</span></code>
- has the same normalized form as <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="identifier">intmax_t</span> <span class="identifier">N2</span><span class="special">,</span> <span class="identifier">intmax_t</span> <span class="identifier">D2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">N2</span><span class="special">,</span> <span class="identifier">D2</span><span class="special">>&</span> <span class="identifier">r</span><span class="special">);</span>
-</pre>
-<p>
- <span class="bold"><strong>Effects:</strong></span> Assigns a <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> object.
- </p>
-<p>
- <span class="bold"><strong>Returns:</strong></span> *this.
- </p>
-<p>
- <span class="bold"><strong>Remarks:</strong></span> This operator will not participate
- in overload resolution unless <code class="computeroutput"><span class="identifier">r</span></code>
- has the same normalized form as <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
- </p>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_arithmetic" title="
- ratio arithmetic">
- <code class="computeroutput"><span class="identifier">ratio</span></code> arithmetic</a>
-</h5></div></div></div>
-<p>
- For each of the class templates in this clause, each template parameter
- refers to a <code class="computeroutput"><span class="identifier">ratio</span></code>. If
- the implementation is unable to form the indicated <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> due to overflow, a diagnostic
- will be issued.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_add</span> <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<p>
- The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
- is a synonym for <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">R1</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span> <span class="special">+</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span><span class="special">>::</span><span class="identifier">type</span></code>.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_subtract</span> <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<p>
- The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
- is a synonym for <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">R1</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span> <span class="special">-</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span><span class="special">>::</span><span class="identifier">type</span></code>.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_multiply</span> <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<p>
- The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
- is a synonym for <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">R1</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">num</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span><span class="special">>::</span><span class="identifier">type</span></code>.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_divide</span> <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<p>
- The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
- is a synonym for <code class="computeroutput"><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">R1</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">den</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">::</span><span class="identifier">num</span> <span class="special">*</span> <span class="identifier">R1</span><span class="special">::</span><span class="identifier">den</span><span class="special">>::</span><span class="identifier">type</span></code>.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_comparison" title="
- ratio comparison">
- <code class="computeroutput"><span class="identifier">ratio</span></code> comparison</a>
-</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_equal</span>
- <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="special">></span> <span class="special">{};</span>
-</pre>
-<p>
- If R1::num <code class="literal">= R2::num && R1::den =</code> R2::den,
- ratio_equal derives from true_type, else derives from false_type.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span>
-<span class="keyword">struct</span> <span class="identifier">ratio_less</span>
- <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">[/</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">]</span> <span class="special">></span> <span class="special">{};</span>
-</pre>
-<p>
- If R1::num * R2::den < R2::num * R1::den, ratio_less derives from
- true_type, else derives from false_type.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_not_equal</span>
- <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">!</span><span class="identifier">ratio_equal</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>::</span><span class="identifier">value</span><span class="special">></span> <span class="special">{};</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_less_equal</span>
- <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">!</span><span class="identifier">ratio_less</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">>::</span><span class="identifier">value</span><span class="special">></span> <span class="special">{};</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_greater</span>
- <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="identifier">ratio_less</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R1</span><span class="special">>::</span><span class="identifier">value</span><span class="special">></span> <span class="special">{};</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">ratio_greater_equal</span>
- <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">integral_constant</span><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="special">!</span><span class="identifier">ratio_less</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>::</span><span class="identifier">value</span><span class="special">></span> <span class="special">{};</span>
-</pre>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs">
- SI typedefs</a>
-</h5></div></div></div>
-<pre class="programlisting"><span class="comment">// convenience SI typedefs
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000000LL</span><span class="special">></span> <span class="identifier">atto</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000000LL</span><span class="special">></span> <span class="identifier">femto</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000000LL</span><span class="special">></span> <span class="identifier">pico</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000000LL</span><span class="special">></span> <span class="identifier">nano</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000000LL</span><span class="special">></span> <span class="identifier">micro</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">1000LL</span><span class="special">></span> <span class="identifier">milli</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">100LL</span><span class="special">></span> <span class="identifier">centi</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1LL</span><span class="special">,</span> <span class="number">10LL</span><span class="special">></span> <span class="identifier">deci</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">10LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">deca</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">100LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">hecto</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">1000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">kilo</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">1000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">mega</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">1000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">giga</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">1000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">tera</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">1000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">peta</span><span class="special">;</span>
-<span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1000000000000000000LL</span><span class="special">,</span> <span class="number">1LL</span><span class="special">></span> <span class="identifier">exa</span><span class="special">;</span>
-</pre>
-<p>
- Four of the typedefs in the recomendation which can be conditionally
- supported are not supported: yocto, zepto, zetta and yotta.
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">,</span> <span class="number">1000000000000000000000000</span><span class="special">></span> <span class="identifier">yocto</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">,</span> <span class="number">1000000000000000000000</span><span class="special">></span> <span class="identifier">zepto</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">1000000000000000000000</span><span class="special">,</span> <span class="number">1</span><span class="special">></span> <span class="identifier">zetta</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1000000000000000000000000</span><span class="special">,</span> <span class="number">1</span><span class="special">></span> <span class="identifier">yotta</span><span class="special">;</span> <span class="comment">// conditionally supported
-</span></pre>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_hpp"></a> Header <boost/chrono.hpp>
-</h4></div></div></div>
-<p>
- This file is a redirection to <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span></code>
- including in addition registration for <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> class templates to
- Boost.Typeof.
- </p>
-<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">typeof</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
-</pre>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp" title=" Header
- <boost/chrono/chrono.hpp>"> Header
- <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf">
- Configuration macros</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock">
- <code class="computeroutput"><span class="identifier">Clock</span></code> Requirements</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits">
- Time-related traits</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.common_type_spe">
- <code class="computeroutput"><span class="identifier">common_type</span></code> specializations</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration">
- Class template <code class="computeroutput"><span class="identifier">duration</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section">duration
non-member arithmetic</span></dt>
-<dt><span class="section">duration
Non-Member comparaisons</span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast">
- Non-Member function <code class="computeroutput"><span class="identifier">duration_cast</span><span class="special">(</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point">
- Class template <code class="computeroutput"><span class="identifier">time_point</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section">time_point
non-member arithmetic</span></dt>
-<dt><span class="section">time_point
non-member comparisons</span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point_cast">
- Non-Member function <code class="computeroutput"><span class="identifier">time_point_cast</span><span class="special">(</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs">
- <code class="computeroutput"><span class="identifier">duration</span></code> typedefs</a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock">
- Class <code class="computeroutput"><span class="identifier">system_clock</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC">
- Macro <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock">
- Class <code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock">
- Class <code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a></span></dt>
-</dl></div>
-<pre class="programlisting"><span class="comment">// configuration macros
-</span><span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf" title="
- Configuration macros"><code class="computeroutput"><span class="identifier">BOOST_CHRONO_USES_STATIC_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf" title="
- Configuration macros"><code class="computeroutput"><span class="identifier">BOOST_CHRONO_USES_MPL_ASSERT</span></code></a>
-<span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf" title="
- Configuration macros"><code class="computeroutput"><span class="identifier">BOOST_CHRONO_USES_ARRAY_ASSERT</span></code></a>
-
-<span class="comment">// preprocessor info
-</span><span class="preprocessor">#define</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
- Macro BOOST_CHRONO_HAS_CLOCK_MONOTONIC"><code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a>
-
-<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
- <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">=</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">></span> <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special">;</span>
-
- <span class="special">}</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.common_type_spe" title="
- common_type specializations"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>;</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.common_type_spe" title="
- common_type specializations"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>,</span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="special">>;</span>
-
- <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
-
- <span class="comment">// customization traits
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.treat_as_floating_point" title="
- Metafunction treat_as_floating_point<>"><code class="computeroutput"><span class="identifier">treat_as_floating_point</span></code></a><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
- Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a><span class="special">;</span>
-
- <span class="comment">// duration arithmetic
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
- <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
- <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
- <span class="identifier">duration</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
- <span class="identifier">duration</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
- <span class="identifier">duration</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span>
- <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">double</span> <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="comment">// duration comparisons
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">></span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="comment">// duration_cast
-</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ToDuration</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="identifier">ToDuration</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="comment">// convenience typedefs
-</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">nano</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a><span class="special">;</span> <span class="comment">// at least 64 bits needed
-</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">micro</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">;</span> <span class="comment">// at least 55 bits needed
-</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a><span class="special">;</span> <span class="comment">// at least 45 bits needed
-</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">;</span> <span class="comment">// at least 35 bits needed
-</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">60</span><span class="special">></span> <span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a><span class="special">;</span> <span class="comment">// at least 29 bits needed
-</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">3600</span><span class="special">></span> <span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a><span class="special">;</span> <span class="comment">// at least 23 bits needed
-</span>
- <span class="comment">// time_point arithmetic
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
- <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
- <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
- <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span>
- <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span>
- <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="comment">// time_point comparisons
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">></span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="comment">// time_point_cast
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ToDuration</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
- <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">ToDuration</span><span class="special">></span> <span class="identifier">time_point_cast</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">);</span>
-
- <span class="comment">// Clocks
-</span> <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">;</span>
- <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
- Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">;</span>
- <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
- Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">;</span>
-
- <span class="special">}</span>
-<span class="special">}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf" title="
- Configuration macros">
- Configuration macros</a>
-</h5></div></div></div>
-<p>
- When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static
- assertions are reported. Define
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- BOOST_CHRONO_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
- </li>
-<li>
- BOOST_CHRONO_USES_MPL_ASSERT: define it if you want to use Boost.MPL
- static asertions
- </li>
-<li>
- BOOST_CHRONO_USES_ARRAY_ASSERT: define it if you want to use internal
- static asertions
- </li>
-<li>
- nothing if you don't want static asertions
- </li>
-</ul></div>
-<p>
- When BOOST_CHRONO_USES_MPL_ASSERT is not defined the following symbols
- are defined as
- </p>
-<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION</span> <span class="special">\</span>
- <span class="string">"A duration representation can not be a duration"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO</span> <span class="special">\</span>
- <span class="string">"Second template parameter of duration must be a std::ratio"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE</span> <span class="special">\</span>
- <span class="string">"duration period must be positive"</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION</span> <span class="special">\</span>
- <span class="string">"Second template parameter of time_point must be a boost::chrono::duration"</span>
-</pre>
-<p>
- Depending on the static assertion used system you will have an hint of
- the failing assertion either through the symbol or through the texte.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
- Clock Requirements">
- <code class="computeroutput"><span class="identifier">Clock</span></code> Requirements</a>
-</h5></div></div></div>
-<p>
- A clock represents a bundle consisting of a native <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, a native <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>, and a function
- <code class="computeroutput"><span class="identifier">now</span><span class="special">()</span></code>
- to get the current <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>. A clock must meet
- the requirements in the following Table.
- </p>
-<p>
- In this table <code class="computeroutput"><span class="identifier">C1</span></code> and
- <code class="computeroutput"><span class="identifier">C2</span></code> denote <code class="computeroutput"><span class="identifier">clock</span></code> types. <code class="computeroutput"><span class="identifier">t1</span></code>
- and <code class="computeroutput"><span class="identifier">t2</span></code> are values returned
- from <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>
- where the call returning <code class="computeroutput"><span class="identifier">t1</span></code>
- happens before the call returning <code class="computeroutput"><span class="identifier">t2</span></code>
- and both of these calls happen before <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">::</span><span class="identifier">max</span><span class="special">()</span></code>.
- </p>
-<div class="table">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock.clock_requirements"></a><p class="title"><b>Table 1. Clock Requirements</b></p>
-<table class="table" summary="Clock Requirements">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- expression
- </p>
- </th>
-<th>
- <p>
- return type
- </p>
- </th>
-<th>
- <p>
- operational semantics
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">rep</span></code>
- </p>
- </td>
-<td>
- <p>
- An arithmetic type or class emulating an arithmetic type.
- </p>
- </td>
-<td>
- <p>
- The representation type of the native <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">period</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ratio</span></code>
- </p>
- </td>
-<td>
- <p>
- The tick period of the clock in seconds.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">duration</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">C1</span><span class="special">::</span><span class="identifier">rep</span><span class="special">,</span>
- <span class="identifier">C1</span><span class="special">::</span><span class="identifier">period</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- The native <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> type of the
- <code class="computeroutput"><span class="identifier">clock</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">C1</span><span class="special">></span>
- <span class="keyword">or</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">C2</span><span class="special">,</span> <span class="identifier">C1</span><span class="special">::</span><span class="identifier">duration</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- The native <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> type of
- the <code class="computeroutput"><span class="identifier">clock</span></code>.
- Different clocks are permitted to share a <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> definition
- if it is valid to compare their time_points by comparing their
- respective <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>. <code class="computeroutput"><span class="identifier">C1</span></code> and <code class="computeroutput"><span class="identifier">C2</span></code>
- must refer to the same epoch.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">is_monotonic</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">bool</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">true</span></code> if <code class="computeroutput"><span class="identifier">t1</span> <span class="special"><=</span>
- <span class="identifier">t2</span></code> is always <code class="computeroutput"><span class="keyword">true</span></code>, else <code class="computeroutput"><span class="keyword">false</span></code>.
- <span class="bold"><strong>Note</strong></span>: A <code class="computeroutput"><span class="identifier">clock</span></code>
- that can be adjusted backwards is not monotonic
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span></code>
- </p>
- </td>
-<td>
- <p>
- Returns a <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> representing
- the current point in time.
- </p>
- </td>
-</tr>
-</tbody>
-</table>
+<dt><span class="section"> Header <boost/chrono.hpp>
</span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf">
+ Configuration macros</a></span></dt></dl></dd>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">duration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits">
+ Time-related traits</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.common_type_spe">
+ <code class="computeroutput"><span class="identifier">common_type</span></code> specialization</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration">
+ Class template <code class="computeroutput"><span class="identifier">duration</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">duration
non-member arithmetic</span></dt>
+<dt><span class="section">duration
Non-Member comparaisons</span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast">
+ Non-Member function <code class="computeroutput"><span class="identifier">duration_cast</span><span class="special">(</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs">
+ <code class="computeroutput"><span class="identifier">duration</span></code> typedefs</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">time_point</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.common_type_spe2">
+ <code class="computeroutput"><span class="identifier">common_type</span></code> specialization</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point">
+ Class template <code class="computeroutput"><span class="identifier">time_point</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">time_point
non-member arithmetic</span></dt>
+<dt><span class="section">time_point
non-member comparisons</span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point_cast">
+ Non-Member function <code class="computeroutput"><span class="identifier">time_point_cast</span><span class="special">(</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">system_clocks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock">
+ <code class="computeroutput"><span class="identifier">Clock</span></code> Requirements</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock">
+ Class <code class="computeroutput"><span class="identifier">system_clock</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC">
+ Macro <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock">
+ Class <code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock">
+ Class <code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_typeof_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">typeof</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.cpp0x.chrono_hpp"></a> Header <boost/chrono.hpp>
+</h4></div></div></div>
+<p>
+ This file is a redirection to <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ including in addition registration for <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> class templates to
+ Boost.Typeof.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">typeof</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp" title=" Header
+ <boost/chrono/chrono.hpp>"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf">
+ Configuration macros</a></span></dt></dl></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">duration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">time_point</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">system_clocks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.conf" title="
+ Configuration macros">
+ Configuration macros</a>
+</h5></div></div></div>
<p>
- Models of Clock:
+ When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static
+ assertions are reported. Define
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a>
- </li>
-<li>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
- Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a>
- </li>
-<li>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
- Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a>
- </li>
-<li>
- <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="
- Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a>
+ BOOST_CHRONO_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
</li>
<li>
- <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="
- Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a>
+ BOOST_CHRONO_USES_MPL_ASSERT: define it if you want to use Boost.MPL
+ static asertions
</li>
<li>
- <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="
- Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a>
+ BOOST_CHRONO_USES_ARRAY_ASSERT: define it if you want to use internal
+ static asertions
</li>
<li>
- <a href="other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
- Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a>
+ nothing if you don't want static asertions
</li>
</ul></div>
+<p>
+ When BOOST_CHRONO_USES_MPL_ASSERT is not defined the following symbols
+ are defined as
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION</span> <span class="special">\</span>
+ <span class="string">"A duration representation can not be a duration"</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO</span> <span class="special">\</span>
+ <span class="string">"Second template parameter of duration must be a std::ratio"</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE</span> <span class="special">\</span>
+ <span class="string">"duration period must be positive"</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION</span> <span class="special">\</span>
+ <span class="string">"Second template parameter of time_point must be a boost::chrono::duration"</span>
+</pre>
+<p>
+ Depending on the static assertion used system you will have an hint of
+ the failing assertion either through the symbol or through the texte.
+ </p>
</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.cpp0x.duration_hpp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp" title=" Header
+ <boost/chrono/duration.hpp>"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">duration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits">
+ Time-related traits</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.common_type_spe">
+ <code class="computeroutput"><span class="identifier">common_type</span></code> specialization</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration">
+ Class template <code class="computeroutput"><span class="identifier">duration</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">duration
non-member arithmetic</span></dt>
+<dt><span class="section">duration
Non-Member comparaisons</span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast">
+ Non-Member function <code class="computeroutput"><span class="identifier">duration_cast</span><span class="special">(</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs">
+ <code class="computeroutput"><span class="identifier">duration</span></code> typedefs</a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">=</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">;</span>
+
+ <span class="special">}</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.common_type_spe" title="
+ common_type specialization"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span>
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>;</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="comment">// customization traits
+</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.treat_as_floating_point" title="
+ Metafunction treat_as_floating_point<>"><code class="computeroutput"><span class="identifier">treat_as_floating_point</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">></span> <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
+ Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a><span class="special">;</span>
+
+ <span class="comment">// duration arithmetic
+</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
+ <span class="identifier">duration</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
+ <span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
+ <span class="identifier">duration</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
+ <span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
+ <span class="identifier">duration</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
+ <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
+ <span class="keyword">double</span> <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="comment">// duration comparisons
+</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">></span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="comment">// duration_cast
+</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ToDuration</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
+ <span class="identifier">ToDuration</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="comment">// convenience typedefs
+</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">nano</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a><span class="special">;</span> <span class="comment">// at least 64 bits needed
+</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">micro</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">;</span> <span class="comment">// at least 55 bits needed
+</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a><span class="special">;</span> <span class="comment">// at least 45 bits needed
+</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">;</span> <span class="comment">// at least 35 bits needed
+</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <span class="identifier">ratio</span><span class="special"><</span> <span class="number">60</span><span class="special">></span> <span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a><span class="special">;</span> <span class="comment">// at least 29 bits needed
+</span> <span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">3600</span><span class="special">></span> <span class="special">></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a><span class="special">;</span> <span class="comment">// at least 23 bits needed
+</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.traits"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits" title="
Time-related traits">
Time-related traits</a>
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.treat_as_floating_point">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.treat_as_floating_point">
Metafunction <code class="computeroutput"><span class="identifier">treat_as_floating_point</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values">
Class template <code class="computeroutput"><span class="identifier">duration_values</span></code></a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.treat_as_floating_point"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.treat_as_floating_point" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.traits.treat_as_floating_point"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.treat_as_floating_point" title="
Metafunction treat_as_floating_point<>">
Metafunction <code class="computeroutput"><span class="identifier">treat_as_floating_point</span><span class="special"><></span></code></a>
</h6></div></div></div>
@@ -1108,24 +285,24 @@
<span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_floating_point</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">></span> <span class="special">{};</span>
</pre>
<p>
- The <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ The <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> template uses the
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.treat_as_floating_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.treat_as_floating_point" title="
Metafunction treat_as_floating_point<>"><code class="computeroutput"><span class="identifier">treat_as_floating_point</span></code></a> trait
- to help determine if a <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ to help determine if a <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> with one tick period
- can be converted to another <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ can be converted to another <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> with a different
tick period. If <code class="computeroutput"><span class="identifier">treat_as_floating_point</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">>::</span><span class="identifier">value</span></code>
is <code class="computeroutput"><span class="keyword">true</span></code>, then <code class="computeroutput"><span class="identifier">Rep</span></code> is a floating point type and
- implicit conversions are allowed among <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ implicit conversions are allowed among <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>. Otherwise, the
- implicit convertibility depends on the tick periods of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ implicit convertibility depends on the tick periods of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>. If <code class="computeroutput"><span class="identifier">Rep</span></code> is a class type which emulates
a floating point type, the author of <code class="computeroutput"><span class="identifier">Rep</span></code>
- can specialize <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.treat_as_floating_point" title="
+ can specialize <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.treat_as_floating_point" title="
Metafunction treat_as_floating_point<>"><code class="computeroutput"><span class="identifier">treat_as_floating_point</span></code></a> so
- that <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ that <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> will treat this
<code class="computeroutput"><span class="identifier">Rep</span></code> as if it were a
floating point type. Otherwise <code class="computeroutput"><span class="identifier">Rep</span></code>
@@ -1135,47 +312,47 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
Class template duration_values">
Class template <code class="computeroutput"><span class="identifier">duration_values</span></code></a>
</h6></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.zero">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.zero">
Static member Function <code class="computeroutput"><span class="identifier">zero</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.max">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.max">
Static member function <code class="computeroutput"><span class="identifier">max</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.min">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.min">
Static member function <code class="computeroutput"><span class="identifier">min</span><span class="special">()</span></code></a></span></dt>
</dl></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">duration_values</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">static</span> <span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <span class="identifier">Rep</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.zero" title="
+ <span class="keyword">static</span> <span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <span class="identifier">Rep</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.zero" title="
Static member Function zero()"><code class="computeroutput"><span class="identifier">zero</span></code></a><span class="special">();</span>
- <span class="keyword">static</span> <span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <span class="identifier">Rep</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.max" title="
+ <span class="keyword">static</span> <span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <span class="identifier">Rep</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.max" title="
Static member function max()"><code class="computeroutput"><span class="identifier">max</span></code></a><span class="special">();</span>
- <span class="keyword">static</span> <span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <span class="identifier">Rep</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.min" title="
+ <span class="keyword">static</span> <span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <span class="identifier">Rep</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.min" title="
Static member function min()"><code class="computeroutput"><span class="identifier">min</span></code></a><span class="special">();</span>
<span class="special">};</span>
</pre>
<p>
- The <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ The <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> template uses the
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a> trait to construct
- special values of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ special values of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> representation
(<code class="computeroutput"><span class="identifier">Rep</span></code>). This is done
because the representation might be a class type with behavior which
requires some other implementation to return these special values.
- In that case, the author of that class type should specialize <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
+ In that case, the author of that class type should specialize <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a> to return
the indicated values.
</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.zero"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.zero" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.zero"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.zero" title="
Static member Function zero()">
Static member Function <code class="computeroutput"><span class="identifier">zero</span><span class="special">()</span></code></a>
</h6></div></div></div>
@@ -1194,7 +371,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.max"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.max" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.max"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.max" title="
Static member function max()">
Static member function <code class="computeroutput"><span class="identifier">max</span><span class="special">()</span></code></a>
</h6></div></div></div>
@@ -1210,7 +387,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.min"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values.min" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.min"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values.min" title="
Static member function min()">
Static member function <code class="computeroutput"><span class="identifier">min</span><span class="special">()</span></code></a>
</h6></div></div></div>
@@ -1228,119 +405,95 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.common_type_spe"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.common_type_spe" title="
- common_type specializations">
- <code class="computeroutput"><span class="identifier">common_type</span></code> specializations</a>
+<a name="boost_chrono.reference.cpp0x.duration_hpp.common_type_spe"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.common_type_spe" title="
+ common_type specialization">
+ <code class="computeroutput"><span class="identifier">common_type</span></code> specialization</a>
</h5></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">struct</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">></span>
<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
- The period of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ The period of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> indicated by this specialization
- of <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> is the greatest
- common divisor of <code class="computeroutput"><span class="identifier">Period1</span></code>
+ of <code class="computeroutput"><span class="identifier">common_type</span></code> is the
+ greatest common divisor of <code class="computeroutput"><span class="identifier">Period1</span></code>
and <code class="computeroutput"><span class="identifier">Period2</span></code>. This can
- be computed by forming a <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> of the greatest common
- divisor of <code class="computeroutput"><span class="identifier">Period1</span><span class="special">::</span><span class="identifier">num</span></code> and <code class="computeroutput"><span class="identifier">Period2</span><span class="special">::</span><span class="identifier">num</span></code>,
- and the least common multiple of <code class="computeroutput"><span class="identifier">Period1</span><span class="special">::</span><span class="identifier">den</span></code>
- and <code class="computeroutput"><span class="identifier">Period2</span><span class="special">::</span><span class="identifier">den</span></code>.
+ be computed by forming a <code class="computeroutput"><span class="identifier">ratio</span></code>
+ of the greatest common divisor of <code class="computeroutput"><span class="identifier">Period1</span><span class="special">::</span><span class="identifier">num</span></code>
+ and <code class="computeroutput"><span class="identifier">Period2</span><span class="special">::</span><span class="identifier">num</span></code>, and the least common multiple
+ of <code class="computeroutput"><span class="identifier">Period1</span><span class="special">::</span><span class="identifier">den</span></code> and <code class="computeroutput"><span class="identifier">Period2</span><span class="special">::</span><span class="identifier">den</span></code>.
</p>
<p>
- <span class="bold"><strong>Note:</strong></span> The typedef type is the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Note:</strong></span> The typedef type is the <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> with the largest tick
- period possible where both <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ period possible where both <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> arguments will convert
to it without requiring a division operation. The representation of this
type is intended to be able to hold any value resulting from this conversion,
- with the possible exception of round-off error when floating point <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ with the possible exception of round-off error when floating point <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> are involved (but
not truncation error).
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>,</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="special">></span>
-<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<p>
- The <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of two <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> is a <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> with the same <code class="computeroutput"><span class="identifier">clock</span></code> (both have the same <code class="computeroutput"><span class="identifier">clock</span></code>), and the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>.
- </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>">
Class template <code class="computeroutput"><span class="identifier">duration</span><span class="special"><></span></code></a>
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_c_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_c_1">
Constructor <code class="computeroutput"><span class="identifier">duration</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_c_2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_c_2">
Constructor <code class="computeroutput"><span class="identifier">duration</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.count">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.count">
Member function <code class="computeroutput"><span class="identifier">count</span><span class="special">()</span> <span class="keyword">const</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_p">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_p">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span> <span class="keyword">const</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_m">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_m">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span> <span class="keyword">const</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pp">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pp">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++()</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pp2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pp2">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_mm">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_mm">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++()</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_mm2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_mm2">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pa">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pa">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_ma">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_ma">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_moda">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_moda">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_proda">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_proda">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">*=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_da">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_da">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_moda_2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_moda_2">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_zero">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_zero">
Static Member function <code class="computeroutput"><span class="identifier">zero</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_min">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_min">
Static Member function <code class="computeroutput"><span class="identifier">min</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_max">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_max">
Static Member function <code class="computeroutput"><span class="identifier">max</span><span class="special">()</span></code></a></span></dt>
</dl></div>
<p>
- A <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ A <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> measures time between
- two points in time ( <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>). A <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ two points in time ( <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>). A <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> has a representation
which holds a count of ticks, and a tick period. The tick period is the
amount of time which occurs from one tick to another in units of a second.
- It is expressed as a rational constant using <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a>.
+ It is expressed as a rational constant using <code class="computeroutput"><span class="identifier">ratio</span></code>.
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
@@ -1390,10 +543,10 @@
<p>
<code class="computeroutput"><span class="identifier">Rep</span></code> must be an arithmetic
type, or a class emulating an arithmetic type, compile diagnostic otherwise.
- If <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ If <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> is instantiated with
the type of <code class="computeroutput"><span class="identifier">Rep</span></code> being
- a <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ a <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, compile diagnostic
is issued.
</p>
@@ -1411,32 +564,30 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span></code> holds a count of minutes using
+ <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span></code> holds a count of minutes using
a long.
</li>
<li>
- <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span></code> holds a count of milliseconds
using a long long.
</li>
<li>
- <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">,</span> <span class="number">30</span><span class="special">></span> <span class="special">></span></code> holds a count using a double
+ <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">,</span> <span class="number">30</span><span class="special">></span> <span class="special">></span></code> holds a count using a double
with a tick period of 1/30 second (a tick frequency of 30 Hz).
</li>
</ul></div>
<p>
- The following members of <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ The following members of <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> do not throw an exception
unless the indicated operations on the representations throw an exception.
</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_c_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_c_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_c_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_c_1" title="
Constructor duration(const Rep2&)">
Constructor <code class="computeroutput"><span class="identifier">duration</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&)</span></code></a>
</h6></div></div></div>
@@ -1461,23 +612,23 @@
<p>
If these constraints are not met, this constructor will not participate
in overload resolution. <span class="bold"><strong>Note:</strong></span> This
- requirement prevents construction of an integral-based <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ requirement prevents construction of an integral-based <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> with a floating point
representation. Such a construction could easily lead to confusion
- about the value of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ about the value of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
<span class="bold"><strong>Example:</strong></span>
</p>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <span class="identifier">d</span><span class="special">(</span><span class="number">3.5</span><span class="special">);</span> <span class="comment">// do not compile
-</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <span class="identifier">d</span><span class="special">(</span><span class="number">3</span><span class="special">);</span> <span class="comment">// ok
</span></pre>
<p>
<span class="bold"><strong>Effects:</strong></span> Constructs an object of type
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
@@ -1486,13 +637,13 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_c_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_c_2" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_c_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_c_2" title="
Constructor duration(const duration&)">
Constructor <code class="computeroutput"><span class="identifier">duration</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
</pre>
<p>
@@ -1502,31 +653,31 @@
<span class="number">1</span></code>, else this constructor will
not participate in overload resolution. <span class="bold"><strong>note</strong></span>
This requirement prevents implicit truncation error when converting
- between integral-based <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ between integral-based <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>. Such a construction
- could easily lead to confusion about the value of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ could easily lead to confusion about the value of the <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
<span class="bold"><strong>Example:</strong></span>
</p>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <span class="identifier">ms</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">micro</span><span class="special">></span> <span class="identifier">us</span> <span class="special">=</span> <span class="identifier">ms</span><span class="special">;</span> <span class="comment">// ok
-</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <span class="identifier">ms2</span> <span class="special">=</span> <span class="identifier">us</span><span class="special">;</span> <span class="comment">// do not compile
</span></pre>
<p>
<span class="bold"><strong>Effects:</strong></span> Constructs an object of type
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, constructing <code class="computeroutput"><span class="identifier">rep_</span></code> from <code class="computeroutput"><span class="identifier">duration_cast</span><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, constructing <code class="computeroutput"><span class="identifier">rep_</span></code> from <code class="computeroutput"><span class="identifier">duration_cast</span><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.count"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.count" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.count"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.count" title="
Member function count() const">
Member function <code class="computeroutput"><span class="identifier">count</span><span class="special">()</span> <span class="keyword">const</span></code></a>
</h6></div></div></div>
@@ -1538,11 +689,11 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_p"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_p" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_p"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_p" title="
Member function operator+() const">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span> <span class="keyword">const</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"><span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <span class="keyword">operator</span><span class="special">+()</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
@@ -1551,25 +702,25 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_m"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_m" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_m"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_m" title="
Member function operator+() const">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span> <span class="keyword">const</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"><span class="identifier">BOOST_CHRONO_CONSTEXPR</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <span class="keyword">operator</span><span class="special">-()</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(-</span><span class="identifier">rep_</span><span class="special">)</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pp" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pp" title="
Member function operator++()">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
</pre>
<p>
@@ -1581,25 +732,25 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pp2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pp2" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pp2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pp2" title="
Member function operator++(int)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
</pre>
<p>
- <span class="bold"><strong>Returns:</strong></span> ` <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Returns:</strong></span> ` <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>(rep_++)v.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_mm"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_mm" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_mm"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_mm" title="
Member function operator++()">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">--();</span>
</pre>
<p>
@@ -1611,26 +762,26 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_mm2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_mm2" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_mm2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_mm2" title="
Member function operator++(int)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <span class="keyword">operator</span><span class="special">--(</span><span class="keyword">int</span><span class="special">);</span>
</pre>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><span class="identifier">rep_</span><span class="special">--)</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pa"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_pa" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pa"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_pa" title="
Member function operator+=(const duration&)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="identifier">d</span><span class="special">);</span>
</pre>
<p>
@@ -1643,12 +794,12 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_ma"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_ma" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_ma"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_ma" title="
Member function operator-=(const duration&)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">-=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">-=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="identifier">d</span><span class="special">);</span>
</pre>
<p>
@@ -1661,12 +812,12 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_moda"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_moda" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_moda"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_moda" title="
Member function operator%=(const duration&)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="identifier">d</span><span class="special">);</span>
</pre>
<p>
@@ -1679,11 +830,11 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_proda"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_proda" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_proda"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_proda" title="
Member function operator*=(const rep&)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">*=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">*=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -1696,11 +847,11 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_da"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_da" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_da"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_da" title="
Member function operator/=(const rep&)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">/=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -1713,11 +864,11 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_moda_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_operator_moda_2" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_moda_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_operator_moda_2" title="
Member function operator%=(const rep&)">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">&</span> <span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <span class="identifier">rep</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -1730,85 +881,84 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_zero"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_zero" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_zero"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_zero" title="
Static Member function zero()">
Static Member function <code class="computeroutput"><span class="identifier">zero</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">static</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"><span class="keyword">static</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <span class="identifier">zero</span><span class="special">();</span>
</pre>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a><span class="special"><</span><span class="identifier">rep</span><span class="special">>::</span><span class="identifier">zero</span><span class="special">())</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_min"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_min" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_min"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_min" title="
Static Member function min()">
Static Member function <code class="computeroutput"><span class="identifier">min</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">static</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"><span class="keyword">static</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <span class="identifier">min</span><span class="special">();</span>
</pre>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a><span class="special"><</span><span class="identifier">rep</span><span class="special">>::</span><span class="identifier">min</span><span class="special">()).</span></code>
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_max"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration.duration_max" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration.duration_max"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration.duration_max" title="
Static Member function max()">
Static Member function <code class="computeroutput"><span class="identifier">max</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">constexpr</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">constexpr</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> <span class="identifier">max</span><span class="special">();</span>
</pre>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">(</span><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a><span class="special"><</span><span class="identifier">rep</span><span class="special">>::</span><span class="identifier">max</span><span class="special">())</span></code>.
</p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic"></a>duration
non-member arithmetic
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic"></a>duration
non-member arithmetic
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_p_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_p_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_m_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_m_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_prod_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_prod_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">*(</span><span class="identifier">Rep1</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">Rep2</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_2">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_3">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_3">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/(</span><span class="identifier">Rep1</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_mod_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_mod_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">Rep2</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_mod_2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_mod_2">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_p_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_p_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_p_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_p_1" title="
Non-Member function operator+(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
-<span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -1818,17 +968,16 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_m_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_m_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_m_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_m_1" title="
Non-Member function operator-(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
-<span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -1836,45 +985,43 @@
is the type of the return value.
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
+<span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Requires:</strong></span> Let <code class="computeroutput"><span class="identifier">CR</span></code>
- represent the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>.
- This function will not participate in overload resolution unless both
- <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly convertible to
- <code class="computeroutput"><span class="identifier">CR</span></code>.
+ represent the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>. This function will not participate
+ in overload resolution unless both <code class="computeroutput"><span class="identifier">Rep1</span></code>
+ and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly
+ convertible to <code class="computeroutput"><span class="identifier">CR</span></code>.
</p>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">CR</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span> <span class="special">*=</span> <span class="identifier">s</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_prod_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_prod_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_prod_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_prod_1" title="
Non-Member function operator*(Rep1,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">*(</span><span class="identifier">Rep1</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
+<span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Requires:</strong></span> Let <code class="computeroutput"><span class="identifier">CR</span></code>
- represent the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>.
- This function will not participate in overload resolution unless both
- <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly convertible to
- <code class="computeroutput"><span class="identifier">CR</span></code>.
+ represent the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>. This function will not participate
+ in overload resolution unless both <code class="computeroutput"><span class="identifier">Rep1</span></code>
+ and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly
+ convertible to <code class="computeroutput"><span class="identifier">CR</span></code>.
</p>
<p>
<span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="identifier">d</span>
@@ -1883,49 +1030,48 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_1" title="
Non-Member function operator/(duration,Rep2)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">Rep2</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
+<span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Requires:</strong></span> Let <code class="computeroutput"><span class="identifier">CR</span></code>
- represent the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>.
- This function will not participate in overload resolution unless both
- <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly convertible to
- <code class="computeroutput"><span class="identifier">CR</span></code>, and <code class="computeroutput"><span class="identifier">Rep2</span></code> is not an instantiation of
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ represent the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>. This function will not participate
+ in overload resolution unless both <code class="computeroutput"><span class="identifier">Rep1</span></code>
+ and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly
+ convertible to <code class="computeroutput"><span class="identifier">CR</span></code>,
+ and <code class="computeroutput"><span class="identifier">Rep2</span></code> is not an
+ instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">CR</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span> <span class="special">/=</span> <span class="identifier">s</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_2" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_2" title="
Non-Member function operator/(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span>
-<span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span>
+<span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Returns:</strong></span> Let <code class="computeroutput"><span class="identifier">CD</span></code>
- represent the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ represent the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> arguments. Returns
<code class="computeroutput"><span class="identifier">CD</span><span class="special">(</span><span class="identifier">lhs</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span>
<span class="special">/</span> <span class="identifier">CD</span><span class="special">(</span><span class="identifier">rhs</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span></code>.
@@ -1933,68 +1079,67 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_3"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_d_3" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_3"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_d_3" title="
Non-Member function operator/(Rep1,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">/(</span><span class="identifier">Rep1</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">double</span> <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">double</span> <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">Rep1</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Remarks:</strong></span> Let <code class="computeroutput"><span class="identifier">CR</span></code>
- represent the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>.
- This function will not participate in overload resolution unless both
- <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly convertible to
- <code class="computeroutput"><span class="identifier">CR</span></code>, and <code class="computeroutput"><span class="identifier">Rep1</span></code> is not an instantiation of
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ represent the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of <code class="computeroutput"><span class="identifier">Rep1</span></code> and <code class="computeroutput"><span class="identifier">Rep2</span></code>. This function will not participate
+ in overload resolution unless both <code class="computeroutput"><span class="identifier">Rep1</span></code>
+ and <code class="computeroutput"><span class="identifier">Rep2</span></code> are implicitly
+ convertible to <code class="computeroutput"><span class="identifier">CR</span></code>,
+ and <code class="computeroutput"><span class="identifier">Rep1</span></code> is not an
+ instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="identifier">CR</span><span class="special">(</span><span class="identifier">s</span><span class="special">)/</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="identifier">CR</span><span class="special">(</span><span class="identifier">s</span><span class="special">)/</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">CR</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_mod_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_mod_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_mod_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_mod_1" title="
Non-Member function operator%(duration,Rep2)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">Rep2</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">%(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Rep2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
+<span class="keyword">operator</span><span class="special">%(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Rep2</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Remarks</strong></span> This function will not participate
in overload resolution unless Rep2 must be implicitly convertible to
- CR(Rep1, Rep2) and Rep2 must not be an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ CR(Rep1, Rep2) and Rep2 must not be an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
- <span class="bold"><strong>Returns:</strong></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="bold"><strong>Returns:</strong></span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><CR(Rep1,Rep2),
Period>(d) %= s.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_mod_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_arithmetic.duration_operator_mod_2" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_mod_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_arithmetic.duration_operator_mod_2" title="
Non-Member function operator%(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">%(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
-<span class="keyword">operator</span><span class="special">%(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">operator</span><span class="special">%(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2008,38 +1153,38 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons"></a>duration
Non-Member comparaisons
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons"></a>duration
Non-Member comparaisons
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_eq_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_eq_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">==(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_neq_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_neq_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">!=(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_lt_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_lt_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_leq_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_leq_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><=(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_gt_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_gt_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_gteq_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_gteq_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>=(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_eq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_eq_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_eq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_eq_1" title="
Non-Member function operator==(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">==(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Returns:</strong></span> Let <code class="computeroutput"><span class="identifier">CD</span></code>
- represent the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ represent the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> arguments. Returns
<code class="computeroutput"><span class="identifier">CD</span><span class="special">(</span><span class="identifier">lhs</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span>
<span class="special">==</span> <span class="identifier">CD</span><span class="special">(</span><span class="identifier">rhs</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span></code>
@@ -2047,14 +1192,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_neq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_neq_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_neq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_neq_1" title="
Non-Member function operator!=(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">!=(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2064,20 +1209,20 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_lt_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_lt_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_lt_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_lt_1" title="
Non-Member function operator<(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Returns:</strong></span> Let <code class="computeroutput"><span class="identifier">CD</span></code>
- represent the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ represent the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> arguments. Returns
<code class="computeroutput"><span class="identifier">CD</span><span class="special">(</span><span class="identifier">lhs</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span>
<span class="special"><</span> <span class="identifier">CD</span><span class="special">(</span><span class="identifier">rhs</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span></code>
@@ -2085,14 +1230,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_leq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_leq_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_leq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_leq_1" title="
Non-Member function operator<=(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><=(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2102,14 +1247,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_gt_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_gt_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_gt_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_gt_1" title="
Non-Member function operator>(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">></span> <span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">></span> <span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2119,14 +1264,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_gteq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._duration__non_member_comparaisons.duration_operator_gteq_1" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_gteq_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp._duration__non_member_comparaisons.duration_operator_gteq_1" title="
Non-Member function operator>=(duration,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>=(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2137,27 +1282,26 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration_cast"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)">
Non-Member function <code class="computeroutput"><span class="identifier">duration_cast</span><span class="special">(</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h5></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ToDuration</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="identifier">ToDuration</span> <span class="identifier">duration_cast</span><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">ToDuration</span> <span class="identifier">duration_cast</span><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Requires:</strong></span> This function will not participate
in overload resolution unless <code class="computeroutput"><span class="identifier">ToDuration</span></code>
- is an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ is an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
<span class="bold"><strong>Returns:</strong></span> Forms <code class="computeroutput"><span class="identifier">CF</span></code>
- which is a <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> resulting from <code class="computeroutput"><span class="identifier">ratio_divide</span><span class="special"><</span><span class="identifier">Period</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ToDuration</span><span class="special">::</span><span class="identifier">period</span><span class="special">>::</span><span class="identifier">type</span></code>.
- Let <code class="computeroutput"><span class="identifier">CR</span></code> be the <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> of <code class="computeroutput"><span class="identifier">ToDuration</span><span class="special">::</span><span class="identifier">rep</span></code>, <code class="computeroutput"><span class="identifier">Rep</span></code>,
- and <code class="computeroutput"><span class="identifier">intmax_t</span></code>.
+ which is a <code class="computeroutput"><span class="identifier">ratio</span></code> resulting
+ from <code class="computeroutput"><span class="identifier">ratio_divide</span><span class="special"><</span><span class="identifier">Period</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ToDuration</span><span class="special">::</span><span class="identifier">period</span><span class="special">>::</span><span class="identifier">type</span></code>.
+ Let <code class="computeroutput"><span class="identifier">CR</span></code> be the <code class="computeroutput"><span class="identifier">common_type</span></code> of <code class="computeroutput"><span class="identifier">ToDuration</span><span class="special">::</span><span class="identifier">rep</span></code>,
+ <code class="computeroutput"><span class="identifier">Rep</span></code>, and <code class="computeroutput"><span class="identifier">intmax_t</span></code>.
</p>
<div class="itemizedlist"><ul type="disc">
<li>
@@ -2191,41 +1335,164 @@
</li>
</ul></div>
<p>
- <span class="bold"><strong>Remarks:</strong></span> This function does not rely
- on any implicit conversions. All conversions must be accomplished through
- <code class="computeroutput"><span class="keyword">static_cast</span></code>. The implementation
- avoids all multiplications or divisions when it is known at compile time
- that it can be avoided because one or more arguments are <code class="computeroutput"><span class="number">1</span></code>. All intermediate computations are carried
- out in the widest possible representation and only converted to the destination
- representation at the final step.
+ <span class="bold"><strong>Remarks:</strong></span> This function does not rely
+ on any implicit conversions. All conversions must be accomplished through
+ <code class="computeroutput"><span class="keyword">static_cast</span></code>. The implementation
+ avoids all multiplications or divisions when it is known at compile time
+ that it can be avoided because one or more arguments are <code class="computeroutput"><span class="number">1</span></code>. All intermediate computations are carried
+ out in the widest possible representation and only converted to the destination
+ representation at the final step.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs">
+ <code class="computeroutput"><span class="identifier">duration</span></code> typedefs</a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="comment">// convenience typedefs
+</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">nano</span><span class="special">></span> <span class="identifier">nanoseconds</span><span class="special">;</span> <span class="comment">// at least 64 bits needed
+</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">micro</span><span class="special">></span> <span class="identifier">microseconds</span><span class="special">;</span> <span class="comment">// at least 55 bits needed
+</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <span class="identifier">milliseconds</span><span class="special">;</span> <span class="comment">// at least 45 bits needed
+</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">></span> <span class="identifier">seconds</span><span class="special">;</span> <span class="comment">// at least 35 bits needed
+</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span> <span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">minutes</span><span class="special">;</span> <span class="comment">// at least 29 bits needed
+</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">3600</span><span class="special">></span> <span class="special">></span> <span class="identifier">hours</span><span class="special">;</span> <span class="comment">// at least 23 bits needed
+</span></pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.cpp0x.time_point_hpp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp" title=" Header
+ <boost/chrono/time_point.hpp>"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">time_point</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.common_type_spe2">
+ <code class="computeroutput"><span class="identifier">common_type</span></code> specialization</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point">
+ Class template <code class="computeroutput"><span class="identifier">time_point</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">time_point
non-member arithmetic</span></dt>
+<dt><span class="section">time_point
non-member comparisons</span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point_cast">
+ Non-Member function <code class="computeroutput"><span class="identifier">time_point_cast</span><span class="special">(</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">></span> <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special">;</span>
+
+ <span class="special">}</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.common_type_spe" title="
+ common_type specialization"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>,</span>
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="special">>;</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="comment">// time_point arithmetic
+</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
+ <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
+ <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
+ <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
+ <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">typename</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span>
+ <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="comment">// time_point comparisons
+</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">></span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="comment">// time_point_cast
+</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ToDuration</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
+ <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">ToDuration</span><span class="special">></span> <span class="identifier">time_point_cast</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">);</span>
+
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.common_type_spe2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.common_type_spe2" title="
+ common_type specialization">
+ <code class="computeroutput"><span class="identifier">common_type</span></code> specialization</a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
+<span class="keyword">struct</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>,</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="special">></span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">common_type</span></code> of two
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> is a <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> with the same <code class="computeroutput"><span class="identifier">clock</span></code> (both have the same <code class="computeroutput"><span class="identifier">clock</span></code>), and the <code class="computeroutput"><span class="identifier">common_type</span></code>
+ of the two <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>">
Class template <code class="computeroutput"><span class="identifier">time_point</span><span class="special"><></span></code></a>
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_1">
Constructor <code class="computeroutput"><span class="identifier">time_point</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_2">
Constructor <code class="computeroutput"><span class="identifier">time_point</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_3">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_3">
Constructor <code class="computeroutput"><span class="identifier">time_point</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_since_epoch">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_since_epoch">
Member function <code class="computeroutput"><span class="identifier">time_since_epoch</span><span class="special">()</span> <span class="keyword">const</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_operator_pe">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_operator_pe">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+=</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_operator_me">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_operator_me">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-=</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_min">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_min">
Static Member function <code class="computeroutput"><span class="identifier">min</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_max">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_max">
Static Member function <code class="computeroutput"><span class="identifier">max</span></code></a></span></dt>
</dl></div>
<p>
- A <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ A <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> represents a point
in time with respect to a specific clock.
</p>
@@ -2262,17 +1529,17 @@
<span class="special">};</span>
</pre>
<p>
- Clock must meet the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ Clock must meet the <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
- Duration must be an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Duration must be an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, compile diagnostic
otherwise.
</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_1" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_1" title="
Constructor time_point()">
Constructor <code class="computeroutput"><span class="identifier">time_point</span><span class="special">()</span></code></a>
</h6></div></div></div>
@@ -2280,17 +1547,17 @@
</pre>
<p>
<span class="bold"><strong>Effects:</strong></span> Constructs an object of
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>, initializing
<code class="computeroutput"><span class="identifier">d_</span></code> with <code class="computeroutput"><span class="identifier">duration</span><span class="special">::</span><span class="identifier">zero</span><span class="special">()</span></code>.
- This <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ This <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> represents the
epoch.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_2" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_2" title="
Constructor time_point(const duration&)">
Constructor <code class="computeroutput"><span class="identifier">time_point</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a>
</h6></div></div></div>
@@ -2298,38 +1565,38 @@
</pre>
<p>
<span class="bold"><strong>Effects:</strong></span> Constructs an object of
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>, initializing
- <code class="computeroutput"><span class="identifier">d_</span></code> with <code class="computeroutput"><span class="identifier">d</span></code>. This <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <code class="computeroutput"><span class="identifier">d_</span></code> with <code class="computeroutput"><span class="identifier">d</span></code>. This <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> represents the
epoch <code class="computeroutput"><span class="special">+</span> <span class="identifier">d</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_3"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_c_3" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_3"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_3" title="
Constructor time_point(const duration&)">
Constructor <code class="computeroutput"><span class="identifier">time_point</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special">&)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="identifier">time_point</span><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="identifier">time_point</span><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Requires:</strong></span> This function will not participate
in overload resolution unless <code class="computeroutput"><span class="identifier">Duration2</span></code>
- is implicitly convertible to <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ is implicitly convertible to <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
<span class="bold"><strong>Effects:</strong></span> Constructs an object of
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>, initializing
<code class="computeroutput"><span class="identifier">d_</span></code> with <code class="computeroutput"><span class="identifier">t</span><span class="special">.</span><span class="identifier">time_since_epoch</span><span class="special">()</span></code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_since_epoch"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_since_epoch" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_since_epoch"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_since_epoch" title="
Member function time_since_epoch() const">
Member function <code class="computeroutput"><span class="identifier">time_since_epoch</span><span class="special">()</span> <span class="keyword">const</span></code></a>
</h6></div></div></div>
@@ -2341,7 +1608,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_operator_pe"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_operator_pe" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_operator_pe"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_operator_pe" title="
Member function operator+=">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+=</span></code></a>
</h6></div></div></div>
@@ -2357,7 +1624,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_operator_me"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_operator_me" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_operator_me"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_operator_me" title="
Member function operator-=">
Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-=</span></code></a>
</h6></div></div></div>
@@ -2373,7 +1640,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_min"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_min" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_min"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_min" title="
Static Member function min">
Static Member function <code class="computeroutput"><span class="identifier">min</span></code></a>
</h6></div></div></div>
@@ -2385,7 +1652,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_max"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point.time_point_max" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_max"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point.time_point_max" title="
Static Member function max">
Static Member function <code class="computeroutput"><span class="identifier">max</span></code></a>
</h6></div></div></div>
@@ -2398,29 +1665,28 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic"></a>time_point
non-member arithmetic
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic"></a>time_point
non-member arithmetic
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_p_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_p_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_p_2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_p_2">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_m_1">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_m_1">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_m_2">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_m_2">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_p_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_p_1" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_p_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_p_1" title="
Non-Member function operator+(time_point,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
+<span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
@@ -2431,16 +1697,15 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_p_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_p_2" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_p_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_p_2" title="
Non-Member function operator+(duration,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">+(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
<span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep1</span><span class="special">,</span> <span class="identifier">Period1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2450,15 +1715,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_m_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_m_1" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_m_1"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_m_1" title="
Non-Member function operator-(time_point,duration)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">duration</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period2</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
+<span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep2</span><span class="special">,</span> <span class="identifier">Period2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
@@ -2469,16 +1733,15 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_m_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_arithmetic.time_point_operator_m_2" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_m_2"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_arithmetic.time_point_operator_m_2" title="
Non-Member function operator-(duration,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">-(</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">typename</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span>
-<span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="identifier">Duration1</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>::</span><span class="identifier">type</span>
+<span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2488,32 +1751,32 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons"></a>time_point
non-member comparisons
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons"></a>time_point
non-member comparisons
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_eq">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_eq">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">==(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_neq">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_neq">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">!=(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_lt">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_lt">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_leq">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_leq">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><=(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_gt">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_gt">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_geq">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_geq">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>=(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_eq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_eq" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_eq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_eq" title="
Non-Member function operator==(time_point,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">==(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2522,15 +1785,15 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_neq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_neq" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_neq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_neq" title="
Non-Member function operator!=(time_point,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">!=(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<p>
template <class Clock, class Duration1, class Duration2> bool
- operator!=(const <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ operator!=(const <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><Clock, Duration1>&
- lhs, const <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ lhs, const <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><Clock, Duration2>&
rhs);
</p>
@@ -2541,14 +1804,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_lt"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_lt" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_lt"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_lt" title="
Non-Member function operator<(time_point,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><</span> <span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2558,14 +1821,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_leq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_leq" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_leq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_leq" title="
Non-Member function operator<=(time_point,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special"><=(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2575,15 +1838,15 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_gt"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_gt" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_gt"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_gt" title="
Non-Member function operator>(time_point,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<p>
template <class Clock, class Duration1, class Duration2> bool
- operator>(const <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ operator>(const <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><Clock, Duration1>&
- lhs, const <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ lhs, const <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><Clock, Duration2>&
rhs);
</p>
@@ -2594,14 +1857,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_geq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp._time_point__non_member_comparisons.time_point_operator_geq" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_geq"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp._time_point__non_member_comparisons.time_point_operator_geq" title="
Non-Member function operator>=(time_point,time_point)">
Non-Member function <code class="computeroutput"><span class="keyword">operator</span><span class="special">>=(</span><span class="identifier">time_point</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
- <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
@@ -2612,59 +1875,277 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point_cast"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point_cast" title="
+<a name="boost_chrono.reference.cpp0x.time_point_hpp.time_point_cast"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point_cast" title="
Non-Member function time_point_cast(time_point)">
Non-Member function <code class="computeroutput"><span class="identifier">time_point_cast</span><span class="special">(</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h5></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ToDuration</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">ToDuration</span><span class="special">></span> <span class="identifier">time_point_cast</span><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">ToDuration</span><span class="special">></span> <span class="identifier">time_point_cast</span><span class="special">(</span><span class="keyword">const</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">);</span>
</pre>
<p>
<span class="bold"><strong>Requires:</strong></span> This function will not participate
in overload resolution unless <code class="computeroutput"><span class="identifier">ToDuration</span></code>
- is an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ is an instantiation of <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<p>
- <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">ToDuration</span><span class="special">>(</span><span class="identifier">duration_cast</span><span class="special"><</span><span class="identifier">ToDuration</span><span class="special">>(</span><span class="identifier">t</span><span class="special">.</span><span class="identifier">time_since_epoch</span><span class="special">()))</span></code>.
</p>
</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp" title=" Header
+ <boost/chrono/system_clocks.hpp>"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">system_clocks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock">
+ <code class="computeroutput"><span class="identifier">Clock</span></code> Requirements</a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock">
+ Class <code class="computeroutput"><span class="identifier">system_clock</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC">
+ Macro <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock">
+ Class <code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a></span></dt>
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock">
+ Class <code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="comment">// Clocks
+</span> <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">;</span>
+ <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
+ Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">;</span>
+ <span class="keyword">class</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
+ Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">;</span>
+
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs">
- <code class="computeroutput"><span class="identifier">duration</span></code> typedefs</a>
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
+ Clock Requirements">
+ <code class="computeroutput"><span class="identifier">Clock</span></code> Requirements</a>
</h5></div></div></div>
-<pre class="programlisting"><span class="comment">// convenience typedefs
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">nano</span><span class="special">></span> <span class="identifier">nanoseconds</span><span class="special">;</span> <span class="comment">// at least 64 bits needed
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">micro</span><span class="special">></span> <span class="identifier">microseconds</span><span class="special">;</span> <span class="comment">// at least 55 bits needed
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">,</span> <span class="identifier">milli</span><span class="special">></span> <span class="identifier">milliseconds</span><span class="special">;</span> <span class="comment">// at least 45 bits needed
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least64_t</span><span class="special">></span> <span class="identifier">seconds</span><span class="special">;</span> <span class="comment">// at least 35 bits needed
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span> <span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">minutes</span><span class="special">;</span> <span class="comment">// at least 29 bits needed
-</span><span class="keyword">typedef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">3600</span><span class="special">></span> <span class="special">></span> <span class="identifier">hours</span><span class="special">;</span> <span class="comment">// at least 23 bits needed
-</span></pre>
+<p>
+ A clock represents a bundle consisting of a native <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, a native <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>, and a function
+ <code class="computeroutput"><span class="identifier">now</span><span class="special">()</span></code>
+ to get the current <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>. A clock must meet
+ the requirements in the following Table.
+ </p>
+<p>
+ In this table <code class="computeroutput"><span class="identifier">C1</span></code> and
+ <code class="computeroutput"><span class="identifier">C2</span></code> denote <code class="computeroutput"><span class="identifier">clock</span></code> types. <code class="computeroutput"><span class="identifier">t1</span></code>
+ and <code class="computeroutput"><span class="identifier">t2</span></code> are values returned
+ from <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>
+ where the call returning <code class="computeroutput"><span class="identifier">t1</span></code>
+ happens before the call returning <code class="computeroutput"><span class="identifier">t2</span></code>
+ and both of these calls happen before <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">::</span><span class="identifier">max</span><span class="special">()</span></code>.
+ </p>
+<div class="table">
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.clock.clock_requirements"></a><p class="title"><b>Table 1. Clock Requirements</b></p>
+<table class="table" summary="Clock Requirements">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ expression
+ </p>
+ </th>
+<th>
+ <p>
+ return type
+ </p>
+ </th>
+<th>
+ <p>
+ operational semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">rep</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ An arithmetic type or class emulating an arithmetic type.
+ </p>
+ </td>
+<td>
+ <p>
+ The representation type of the native <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">period</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ratio</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The tick period of the clock in seconds.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">duration</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">C1</span><span class="special">::</span><span class="identifier">rep</span><span class="special">,</span>
+ <span class="identifier">C1</span><span class="special">::</span><span class="identifier">period</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The native <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> type of the
+ <code class="computeroutput"><span class="identifier">clock</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">C1</span><span class="special">></span>
+ <span class="keyword">or</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">C2</span><span class="special">,</span> <span class="identifier">C1</span><span class="special">::</span><span class="identifier">duration</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The native <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> type of
+ the <code class="computeroutput"><span class="identifier">clock</span></code>.
+ Different clocks are permitted to share a <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> definition
+ if it is valid to compare their time_points by comparing their
+ respective <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>. <code class="computeroutput"><span class="identifier">C1</span></code> and <code class="computeroutput"><span class="identifier">C2</span></code>
+ must refer to the same epoch.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">is_monotonic</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">bool</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">true</span></code> if <code class="computeroutput"><span class="identifier">t1</span> <span class="special"><=</span>
+ <span class="identifier">t2</span></code> is always <code class="computeroutput"><span class="keyword">true</span></code>, else <code class="computeroutput"><span class="keyword">false</span></code>.
+ <span class="bold"><strong>Note</strong></span>: A <code class="computeroutput"><span class="identifier">clock</span></code>
+ that can be adjusted backwards is not monotonic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> representing
+ the current point in time.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table>
+</div>
+<p>
+ Models of Clock:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a>
+ </li>
+<li>
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
+ Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a>
+ </li>
+<li>
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
+ Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a>
+ </li>
+<li>
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="
+ Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a>
+ </li>
+<li>
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="
+ Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a>
+ </li>
+<li>
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="
+ Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a>
+ </li>
+<li>
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a>
+ </li>
+</ul></div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock">
Class <code class="computeroutput"><span class="identifier">system_clock</span></code></a>
</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock.to_time_t">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock.to_time_t">
Static member function <code class="computeroutput"><span class="identifier">to_time_t</span><span class="special">(</span><span class="identifier">time_point</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock.from_time_t">
+<dt><span class="section"><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock.from_time_t">
Static member function <code class="computeroutput"><span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_t</span><span class="special">)</span></code></a></span></dt>
</dl></div>
<p>
@@ -2694,7 +2175,7 @@
</pre>
<p>
<code class="computeroutput"><span class="identifier">system_clock</span></code> satisfy
- the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ the <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>:
</p>
<div class="itemizedlist"><ul type="disc"><li>
@@ -2703,7 +2184,7 @@
</li></ul></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock.to_time_t"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock.to_time_t" title="
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock.to_time_t"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock.to_time_t" title="
Static member function to_time_t(time_point)">
Static member function <code class="computeroutput"><span class="identifier">to_time_t</span><span class="special">(</span><span class="identifier">time_point</span><span class="special">)</span></code></a>
</h6></div></div></div>
@@ -2720,25 +2201,25 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock.from_time_t"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock.from_time_t" title="
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock.from_time_t"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock.from_time_t" title="
Static member function from_time_t(time_t)">
Static member function <code class="computeroutput"><span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_t</span><span class="special">)</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="identifier">time_point</span> <span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_t</span> <span class="identifier">t</span><span class="special">);</span>
</pre>
<p>
- <span class="bold"><strong>Returns:</strong></span> A <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="bold"><strong>Returns:</strong></span> A <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> such that the
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> and <code class="computeroutput"><span class="identifier">t</span></code> represent the same point in time,
- truncated to the courser of the precisions among <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ truncated to the courser of the precisions among <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> and <code class="computeroutput"><span class="identifier">t</span></code>.
</p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
Macro BOOST_CHRONO_HAS_CLOCK_MONOTONIC">
Macro <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a>
</h5></div></div></div>
@@ -2748,18 +2229,18 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock">
Class <code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a>
</h5></div></div></div>
<p>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a> satisfy the
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
- <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a> class provides
access to the system-wide monotonic clock. The current time can be obtained
by calling <code class="computeroutput"><span class="identifier">monotonic_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>. There is no fixed relationship between
@@ -2782,16 +2263,16 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
+<a name="boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock"></a><a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
Class high_resolution_clock">
Class <code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a>
</h5></div></div></div>
<p>
<code class="computeroutput"><span class="identifier">high_resolution_clock</span></code>
- satisfy the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ satisfy the <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
-<pre class="programlisting"><span class="preprocessor">#ifdef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
+<pre class="programlisting"><span class="preprocessor">#ifdef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
Macro BOOST_CHRONO_HAS_CLOCK_MONOTONIC"><code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a>
<span class="keyword">typedef</span> <span class="identifier">monotonic_clock</span> <span class="identifier">high_resolution_clock</span><span class="special">;</span> <span class="comment">// as permitted by [time.clock.hires]
</span><span class="preprocessor">#else</span>
@@ -2807,7 +2288,7 @@
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">typeof</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
</h4></div></div></div>
<p>
- Register <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Register <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><code class="computeroutput"><span class="special"><></span></code>
and <span class="underline">_timepoint</span>_<code class="computeroutput"><span class="special"><></span></code>
class templates to Boost.Typeof.
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -69,7 +69,7 @@
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">timer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">system_timer</span><span class="special">;</span>
- <span class="preprocessor">#ifdef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
+ <span class="preprocessor">#ifdef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
Macro BOOST_CHRONO_HAS_CLOCK_MONOTONIC"><code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a>
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">monotonic_timer</span><span class="special">;</span>
<span class="preprocessor">#endif</span>
@@ -119,7 +119,7 @@
</h5></div></div></div>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">timer</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">></span>
<span class="identifier">system_timer</span><span class="special">;</span>
-<span class="preprocessor">#ifdef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
+<span class="preprocessor">#ifdef</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.BOOST_CHRONO_HAS_CLOCK_MONOTONIC" title="
Macro BOOST_CHRONO_HAS_CLOCK_MONOTONIC"><code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span></code></a>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">timer</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">monotonic_clock</span> <span class="special">></span>
<span class="identifier">monotonic_timer</span><span class="special">;</span>
@@ -187,7 +187,7 @@
<span class="keyword">typedef</span> <span class="identifier">nanoseconds</span> <span class="identifier">duration</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">rep</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special">::</span><span class="identifier">period</span> <span class="identifier">period</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">process_clock</span><span class="special">></span> <span class="identifier">time_point</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_monotonic</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -91,7 +91,7 @@
<p>
<a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="
Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a> satisfy
- the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ the <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
@@ -122,7 +122,7 @@
<p>
<a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="
Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a> satisfy
- the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ the <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
@@ -152,7 +152,7 @@
<p>
<a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="
Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a> satisfy
- the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ the <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
@@ -256,7 +256,7 @@
<code class="computeroutput"><span class="identifier">times</span></code></a>
</h6></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><></span>
-<span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.traits.duration_values" title="
+<span class="keyword">struct</span> <a href="cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.traits.duration_values" title="
Class template duration_values"><code class="computeroutput"><span class="identifier">duration_values</span></code></a><span class="special"><</span><span class="identifier">process_cpu_clock</span><span class="special">::</span><span class="identifier">times</span><span class="special">></span>
<span class="special">{</span>
<span class="keyword">static</span> <span class="identifier">process_cpu_clock</span><span class="special">::</span><span class="identifier">times</span> <span class="identifier">zero</span><span class="special">();</span>
@@ -329,7 +329,7 @@
</h5></div></div></div>
<p>
<a href="other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
- Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> satisfy the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> satisfy the <a href="cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -36,9 +36,6 @@
</dl></dd>
<dt><span class="section">Tutorial</span></dt>
<dd><dl>
-<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.common_type">Common
- Type</a></span></dt>
-<dt><span class="section">Ratio</span></dt>
<dt><span class="section">Duration</span></dt>
<dt><span class="section">Clocks</span></dt>
<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.time_point">Time
@@ -48,7 +45,6 @@
<dd><dl>
<dt><span class="section"><a href="users_guide/examples.html#boost_chrono.users_guide.examples.common_type">Common
type</a></span></dt>
-<dt><span class="section">Ratio</span></dt>
<dt><span class="section">Duration</span></dt>
<dt><span class="section">Clocks</span></dt>
<dt><span class="section">Conversions</span></dt>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -31,8 +31,6 @@
type</a></span></dt>
<dd><dl><dt><span class="section"><a href="examples.html#boost_chrono.users_guide.examples.common_type.min_utility">min
utility</a></span></dt></dl></dd>
-<dt><span class="section">Ratio</span></dt>
-<dd><dl><dt><span class="section">SI-units</span></dt></dl></dd>
<dt><span class="section">Duration</span></dt>
<dd><dl>
<dt><span class="section"><a href="examples.html#boost_chrono.users_guide.examples.duration.how_you_override_the_duration_s_default_constructor">How
@@ -77,13 +75,12 @@
Returns the earliest time_point.
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>,</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
-<span class="identifier">min</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">></span> <span class="identifier">t1</span><span class="special">,</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="identifier">min</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">></span> <span class="identifier">t1</span><span class="special">,</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="identifier">t2</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">t2</span> <span class="special"><</span> <span class="identifier">t1</span> <span class="special">?</span> <span class="identifier">t2</span> <span class="special">:</span> <span class="identifier">t1</span><span class="special">;</span>
@@ -104,300 +101,6 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.users_guide.examples.ratio"></a>Ratio
-</h4></div></div></div>
-<div class="toc"><dl><dt><span class="section">SI-units</span></dt></dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.users_guide.examples.ratio.si_units"></a>SI-units
-</h5></div></div></div>
-<p>
- Type-safe "physics" code interoperating with boost::chrono::
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> types and taking advantage
- of the boost::<a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> infrastructure and design
- philosophy.
- </p>
-<p>
- length - mimics boost::chrono:: <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> except restricts representation
- to double. Uses boost::<a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> facilities for length
- units conversions.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Ratio</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">length</span> <span class="special">{</span>
-<span class="keyword">private</span><span class="special">:</span>
- <span class="keyword">double</span> <span class="identifier">len_</span><span class="special">;</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">typedef</span> <span class="identifier">Ratio</span> <span class="identifier">ratio</span><span class="special">;</span>
- <span class="identifier">length</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">len_</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">{}</span>
- <span class="identifier">length</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&</span> <span class="identifier">len</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">len_</span><span class="special">(</span><span class="identifier">len</span><span class="special">)</span> <span class="special">{}</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R</span><span class="special">></span>
- <span class="identifier">length</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">length</span><span class="special"><</span><span class="identifier">R</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">)</span>
- <span class="special">:</span> <span class="identifier">len_</span><span class="special">(</span><span class="identifier">d</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special">*</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_divide</span><span class="special"><</span><span class="identifier">Ratio</span><span class="special">,</span> <span class="identifier">R</span><span class="special">>::</span><span class="identifier">type</span><span class="special">::</span><span class="identifier">den</span> <span class="special">/</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_divide</span><span class="special"><</span><span class="identifier">Ratio</span><span class="special">,</span> <span class="identifier">R</span><span class="special">>::</span><span class="identifier">type</span><span class="special">::</span><span class="identifier">num</span><span class="special">)</span> <span class="special">{}</span>
-
- <span class="keyword">double</span> <span class="identifier">count</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">len_</span><span class="special">;}</span>
-
- <span class="identifier">length</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="keyword">const</span> <span class="identifier">length</span><span class="special">&</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">{</span><span class="identifier">len_</span> <span class="special">+=</span> <span class="identifier">d</span><span class="special">.</span><span class="identifier">count</span><span class="special">();</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;}</span>
- <span class="identifier">length</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">-=(</span><span class="keyword">const</span> <span class="identifier">length</span><span class="special">&</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">{</span><span class="identifier">len_</span> <span class="special">-=</span> <span class="identifier">d</span><span class="special">.</span><span class="identifier">count</span><span class="special">();</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;}</span>
-
- <span class="identifier">length</span> <span class="keyword">operator</span><span class="special">+()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;}</span>
- <span class="identifier">length</span> <span class="keyword">operator</span><span class="special">-()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">length</span><span class="special">(-</span><span class="identifier">len_</span><span class="special">);}</span>
-
- <span class="identifier">length</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*=(</span><span class="keyword">double</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="special">{</span><span class="identifier">len_</span> <span class="special">*=</span> <span class="identifier">rhs</span><span class="special">;</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;}</span>
- <span class="identifier">length</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">/=(</span><span class="keyword">double</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="special">{</span><span class="identifier">len_</span> <span class="special">/=</span> <span class="identifier">rhs</span><span class="special">;</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;}</span>
-<span class="special">};</span>
-</pre>
-<p>
- Sparse sampling of length units
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="identifier">meter</span><span class="special">;</span> <span class="comment">// set meter as "unity"
-</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">centi</span></code></a><span class="special">></span> <span class="identifier">centimeter</span><span class="special">;</span> <span class="comment">// 1/100 meter
-</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">kilo</span></code></a><span class="special">></span> <span class="identifier">kilometer</span><span class="special">;</span> <span class="comment">// 1000 meters
-</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">254</span><span class="special">,</span> <span class="number">10000</span><span class="special">></span> <span class="special">></span> <span class="identifier">inch</span><span class="special">;</span> <span class="comment">// 254/10000 meters
-</span></pre>
-<p>
- length takes <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> instead of two integral
- types so that definitions can be made like so:
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_multiply</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">12</span><span class="special">>,</span> <span class="identifier">inch</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">foot</span><span class="special">;</span> <span class="comment">// 12 inchs
-</span><span class="keyword">typedef</span> <span class="identifier">length</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_multiply</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">5280</span><span class="special">>,</span> <span class="identifier">foot</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">mile</span><span class="special">;</span> <span class="comment">// 5280 feet
-</span></pre>
-<p>
- Need a floating point definition of seconds
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">seconds</span><span class="special">;</span> <span class="comment">// unity
-</span></pre>
-<p>
- Demo of (scientific) support for sub-nanosecond resolutions
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">pico</span></code></a><span class="special">></span> <span class="identifier">picosecond</span><span class="special">;</span> <span class="comment">// 10^-12 seconds
-</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">femto</span></code></a><span class="special">></span> <span class="identifier">femtosecond</span><span class="special">;</span> <span class="comment">// 10^-15 seconds
-</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">atto</span></code></a><span class="special">></span> <span class="identifier">attosecond</span><span class="special">;</span> <span class="comment">// 10^-18 seconds
-</span></pre>
-<p>
- A very brief proof-of-concept for SIUnits-like library. Hard-wired to
- floating point seconds and meters, but accepts other units.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">quantity</span>
-<span class="special">{</span>
- <span class="keyword">double</span> <span class="identifier">q_</span><span class="special">;</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">typedef</span> <span class="identifier">R1</span> <span class="identifier">time_dim</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">R2</span> <span class="identifier">distance_dim</span><span class="special">;</span>
- <span class="identifier">quantity</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">q_</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">{}</span>
-
- <span class="keyword">double</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">q_</span><span class="special">;}</span>
- <span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">{</span><span class="identifier">q_</span> <span class="special">=</span> <span class="identifier">q</span><span class="special">;}</span>
-<span class="special">};</span>
-
-<span class="keyword">template</span> <span class="special"><></span>
-<span class="keyword">class</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span>
-<span class="special">{</span>
- <span class="keyword">double</span> <span class="identifier">q_</span><span class="special">;</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">quantity</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">q_</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">{}</span>
- <span class="identifier">quantity</span><span class="special">(</span><span class="identifier">seconds</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">q_</span><span class="special">(</span><span class="identifier">d</span><span class="special">.</span><span class="identifier">count</span><span class="special">())</span> <span class="special">{}</span> <span class="comment">// note: only User1::seconds needed here
-</span>
- <span class="keyword">double</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">q_</span><span class="special">;}</span>
- <span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">{</span><span class="identifier">q_</span> <span class="special">=</span> <span class="identifier">q</span><span class="special">;}</span>
-<span class="special">};</span>
-
-<span class="keyword">template</span> <span class="special"><></span>
-<span class="keyword">class</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span>
-<span class="special">{</span>
- <span class="keyword">double</span> <span class="identifier">q_</span><span class="special">;</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">quantity</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">q_</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">{}</span>
- <span class="identifier">quantity</span><span class="special">(</span><span class="identifier">meter</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">q_</span><span class="special">(</span><span class="identifier">d</span><span class="special">.</span><span class="identifier">count</span><span class="special">())</span> <span class="special">{}</span> <span class="comment">// note: only User1::meter needed here
-</span>
- <span class="keyword">double</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">q_</span><span class="special">;}</span>
- <span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">{</span><span class="identifier">q_</span> <span class="special">=</span> <span class="identifier">q</span><span class="special">;}</span>
-<span class="special">};</span>
-
-<span class="keyword">template</span> <span class="special"><></span>
-<span class="keyword">class</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span>
-<span class="special">{</span>
- <span class="keyword">double</span> <span class="identifier">q_</span><span class="special">;</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">quantity</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">q_</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">{}</span>
- <span class="identifier">quantity</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">q_</span><span class="special">(</span><span class="identifier">d</span><span class="special">)</span> <span class="special">{}</span>
-
- <span class="keyword">double</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">q_</span><span class="special">;}</span>
- <span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">{</span><span class="identifier">q_</span> <span class="special">=</span> <span class="identifier">q</span><span class="special">;}</span>
-<span class="special">};</span>
-</pre>
-<p>
- Example of SI-Units
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="identifier">Scalar</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="identifier">Time</span><span class="special">;</span> <span class="comment">// second
-</span><span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="identifier">Distance</span><span class="special">;</span> <span class="comment">// meter
-</span><span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><-</span><span class="number">1</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="identifier">Speed</span><span class="special">;</span> <span class="comment">// meter/second
-</span><span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><-</span><span class="number">2</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="identifier">Acceleration</span><span class="special">;</span> <span class="comment">// meter/second^2
-</span></pre>
-<p>
- Quantity arithmetics
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R3</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R4</span><span class="special">></span>
-<span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
- <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R3</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>&</span> <span class="identifier">y</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
- <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">R</span><span class="special">;</span>
- <span class="identifier">R</span> <span class="identifier">r</span><span class="special">;</span>
- <span class="identifier">r</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="identifier">x</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">/</span> <span class="identifier">y</span><span class="special">.</span><span class="identifier">get</span><span class="special">());</span>
- <span class="keyword">return</span> <span class="identifier">r</span><span class="special">;</span>
-<span class="special">}</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R3</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R4</span><span class="special">></span>
-<span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
- <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R3</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>&</span> <span class="identifier">y</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
- <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">R</span><span class="special">;</span>
- <span class="identifier">R</span> <span class="identifier">r</span><span class="special">;</span>
- <span class="identifier">r</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="identifier">x</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">*</span> <span class="identifier">y</span><span class="special">.</span><span class="identifier">get</span><span class="special">());</span>
- <span class="keyword">return</span> <span class="identifier">r</span><span class="special">;</span>
-<span class="special">}</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span>
-<span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">y</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">></span> <span class="identifier">R</span><span class="special">;</span>
- <span class="identifier">R</span> <span class="identifier">r</span><span class="special">;</span>
- <span class="identifier">r</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="identifier">x</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">y</span><span class="special">.</span><span class="identifier">get</span><span class="special">());</span>
- <span class="keyword">return</span> <span class="identifier">r</span><span class="special">;</span>
-<span class="special">}</span>
-
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">R1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">R2</span><span class="special">></span>
-<span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">y</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">></span> <span class="identifier">R</span><span class="special">;</span>
- <span class="identifier">R</span> <span class="identifier">r</span><span class="special">;</span>
- <span class="identifier">r</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="identifier">x</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">-</span> <span class="identifier">y</span><span class="special">.</span><span class="identifier">get</span><span class="special">());</span>
- <span class="keyword">return</span> <span class="identifier">r</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- Example type-safe physics function
- </p>
-<pre class="programlisting"><span class="identifier">Distance</span>
-<span class="identifier">compute_distance</span><span class="special">(</span><span class="identifier">Speed</span> <span class="identifier">v0</span><span class="special">,</span> <span class="identifier">Time</span> <span class="identifier">t</span><span class="special">,</span> <span class="identifier">Acceleration</span> <span class="identifier">a</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">v0</span> <span class="special">*</span> <span class="identifier">t</span> <span class="special">+</span> <span class="identifier">Scalar</span><span class="special">(.</span><span class="number">5</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">a</span> <span class="special">*</span> <span class="identifier">t</span> <span class="special">*</span> <span class="identifier">t</span><span class="special">;</span> <span class="comment">// if a units mistake is made here it won't compile
-</span><span class="special">}</span>
-</pre>
-<p>
- Exercise example type-safe physics function and show interoperation of
- custom time durations (User1::seconds) and standard time durations (boost::hours).
- Though input can be arbitrary (but type-safe) units, output is always
- in SI-units (a limitation of the simplified Units lib demoed here).
- </p>
-<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
-<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">8</span><span class="special">,</span> <span class="identifier">BOOST_INTMAX_C</span><span class="special">(</span><span class="number">0</span><span class="identifier">x7FFFFFFFD</span><span class="special">)></span> <span class="identifier">R1</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">3</span><span class="special">,</span> <span class="identifier">BOOST_INTMAX_C</span><span class="special">(</span><span class="number">0</span><span class="identifier">x7FFFFFFFD</span><span class="special">)></span> <span class="identifier">R2</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> <span class="special">></span> <span class="identifier">RR</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">RS</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">RS</span><span class="special">::</span><span class="identifier">num</span> <span class="special"><<</span> <span class="char">'/'</span> <span class="special"><<</span> <span class="identifier">RS</span><span class="special">::</span><span class="identifier">den</span> <span class="special"><<</span> <span class="char">'\n'</span><span class="special">;</span>
-
-
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"*************\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"* testUser1 *\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"*************\n"</span><span class="special">;</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Distance</span> <span class="identifier">d</span><span class="special">(</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">(</span><span class="number">110</span><span class="special">)</span> <span class="special">);</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span> <span class="identifier">t</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">)</span> <span class="special">);</span>
-
- <span class="identifier">RR</span> <span class="identifier">r</span><span class="special">=</span><span class="identifier">d</span> <span class="special">/</span> <span class="identifier">t</span><span class="special">;</span>
- <span class="comment">//r.set(d.get() / t.get());
-</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Speed</span> <span class="identifier">rc</span><span class="special">=</span> <span class="identifier">r</span><span class="special">;</span>
-
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Speed</span> <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">d</span> <span class="special">/</span> <span class="identifier">t</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Speed = "</span> <span class="special"><<</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" meters/sec\n"</span><span class="special">;</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Acceleration</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Distance</span><span class="special">(</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">foot</span><span class="special">(</span><span class="number">32.2</span><span class="special">)</span> <span class="special">)</span> <span class="special">/</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span><span class="special">()</span> <span class="special">/</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Acceleration = "</span> <span class="special"><<</span> <span class="identifier">a</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" meters/sec^2\n"</span><span class="special">;</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Distance</span> <span class="identifier">df</span> <span class="special">=</span> <span class="identifier">compute_distance</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span><span class="special">(</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">0.5</span><span class="special">)</span> <span class="special">),</span> <span class="identifier">a</span><span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Distance = "</span> <span class="special"><<</span> <span class="identifier">df</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" meters\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"There are "</span>
- <span class="special"><<</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">::</span><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">den</span> <span class="special"><<</span> <span class="char">'/'</span> <span class="special"><<</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">::</span><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">num</span> <span class="special"><<</span> <span class="string">" miles/meter"</span><span class="special">;</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">meter</span> <span class="identifier">mt</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span> <span class="identifier">mi</span> <span class="special">=</span> <span class="identifier">mt</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is approximately "</span> <span class="special"><<</span> <span class="identifier">mi</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="char">'\n'</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"There are "</span>
- <span class="special"><<</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">::</span><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">num</span> <span class="special"><<</span> <span class="char">'/'</span> <span class="special"><<</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">::</span><span class="identifier">ratio</span><span class="special">::</span><span class="identifier">den</span> <span class="special"><<</span> <span class="string">" meters/mile"</span><span class="special">;</span>
- <span class="identifier">mi</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
- <span class="identifier">mt</span> <span class="special">=</span> <span class="identifier">mi</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is approximately "</span> <span class="special"><<</span> <span class="identifier">mt</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="char">'\n'</span><span class="special">;</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">attosecond</span> <span class="identifier">as</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">seconds</span> <span class="identifier">sec</span> <span class="special">=</span> <span class="identifier">as</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"1 attosecond is "</span> <span class="special"><<</span> <span class="identifier">sec</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" seconds\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"sec = as; // compiles\n"</span><span class="special">;</span>
- <span class="identifier">sec</span> <span class="special">=</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
- <span class="identifier">as</span> <span class="special">=</span> <span class="identifier">sec</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"1 second is "</span> <span class="special"><<</span> <span class="identifier">as</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" attoseconds\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"as = sec; // compiles\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\n"</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- <span class="emphasis"><em>See the source file test/ratio_test.cpp</em></span>
- </p>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
<a name="boost_chrono.users_guide.examples.duration"></a>Duration
</h4></div></div></div>
<div class="toc"><dl>
@@ -456,20 +159,18 @@
<span class="keyword">friend</span> <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="identifier">zero_default</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">zero_default</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="special">!(</span><span class="identifier">x</span> <span class="special"><</span> <span class="identifier">y</span><span class="special">);}</span>
<span class="special">};</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">nano</span> <span class="special">></span> <span class="identifier">nanoseconds</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">micro</span> <span class="special">></span> <span class="identifier">microseconds</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">milli</span> <span class="special">></span> <span class="identifier">milliseconds</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">></span> <span class="special">></span> <span class="identifier">seconds</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">minutes</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">3600</span><span class="special">></span> <span class="special">></span> <span class="identifier">hours</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">minutes</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">zero_default</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">3600</span><span class="special">></span> <span class="special">></span> <span class="identifier">hours</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
@@ -557,7 +258,7 @@
A "saturating" signed integral type is developed. This type
has +/- infinity and a nan (like IEEE floating point) but otherwise obeys
signed integral arithmetic. This class is subsequently used as the rep
- in boost::chrono:: <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ in boost::chrono:: <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> to demonstrate a duration
class that does not silently ignore overflow.
</p>
@@ -606,16 +307,13 @@
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">speed</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">cycle_count</span>
<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">__ratio_multiply__</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="identifier">speed</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">mega</span></code></a><span class="special">>::</span><span class="identifier">type</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">__ratio_multiply__</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="identifier">speed</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">mega</span></code><span class="special">>::</span><span class="identifier">type</span>
<span class="identifier">frequency</span><span class="special">;</span> <span class="comment">// Mhz
-</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">__ratio_divide__</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>,</span> <span class="identifier">frequency</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">period</span><span class="special">;</span>
+</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">__ratio_divide__</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">>,</span> <span class="identifier">frequency</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">period</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">rep</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">rep</span><span class="special">,</span> <span class="identifier">period</span><span class="special">></span> <span class="identifier">duration</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">cycle_count</span><span class="special">></span> <span class="identifier">time_point</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">time_point</span> <span class="identifier">now</span><span class="special">()</span>
@@ -634,7 +332,7 @@
<span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">rep</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">duration</span><span class="special">::</span><span class="identifier">period</span> <span class="identifier">period</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">nanosec_per_sec</span> <span class="special">=</span> <span class="identifier">period</span><span class="special">::</span><span class="identifier">den</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">approx_cycle_count</span><span class="special">></span> <span class="identifier">time_point</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">time_point</span> <span class="identifier">now</span><span class="special">()</span>
@@ -747,9 +445,9 @@
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">xtime</span> <span class="identifier">rep</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">micro</span> <span class="identifier">period</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">rep</span><span class="special">,</span> <span class="identifier">period</span><span class="special">></span> <span class="identifier">duration</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">xtime_clock</span><span class="special">></span> <span class="identifier">time_point</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">time_point</span> <span class="identifier">now</span><span class="special">()</span>
@@ -842,31 +540,31 @@
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
<span class="identifier">xtime</span>
-<span class="identifier">to_xtime_truncate</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">to_xtime_truncate</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="identifier">d</span><span class="special">)</span>
<span class="special">{</span>
<span class="identifier">xtime</span> <span class="identifier">xt</span><span class="special">;</span>
- <span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">).</span><span class="identifier">count</span><span class="special">());</span>
- <span class="identifier">xt</span><span class="special">.</span><span class="identifier">usec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">xt</span><span class="special">.</span><span class="identifier">usec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">(</span><span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span><span class="special">)).</span><span class="identifier">count</span><span class="special">());</span>
<span class="keyword">return</span> <span class="identifier">xt</span><span class="special">;</span>
<span class="special">}</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
<span class="identifier">xtime</span>
-<span class="identifier">to_xtime_round_up</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">to_xtime_round_up</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="identifier">d</span><span class="special">)</span>
<span class="special">{</span>
<span class="identifier">xtime</span> <span class="identifier">xt</span><span class="special">;</span>
- <span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">).</span><span class="identifier">count</span><span class="special">());</span>
- <span class="identifier">xt</span><span class="special">.</span><span class="identifier">usec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">>(</span><span class="identifier">round_up</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">xt</span><span class="special">.</span><span class="identifier">usec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">>(</span><span class="identifier">round_up</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">(</span><span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span><span class="special">)).</span><span class="identifier">count</span><span class="special">());</span>
<span class="keyword">return</span> <span class="identifier">xt</span><span class="special">;</span>
<span class="special">}</span>
@@ -874,8 +572,8 @@
<span class="identifier">microseconds</span>
<span class="identifier">from_xtime</span><span class="special">(</span><span class="identifier">xtime</span> <span class="identifier">xt</span><span class="special">)</span>
<span class="special">{</span>
- <span class="keyword">return</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">(</span><span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="keyword">return</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">(</span><span class="identifier">xt</span><span class="special">.</span><span class="identifier">sec</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">(</span><span class="identifier">xt</span><span class="special">.</span><span class="identifier">usec</span><span class="special">);</span>
<span class="special">}</span>
@@ -887,19 +585,19 @@
<p>
Usage
</p>
-<pre class="programlisting"><span class="identifier">xtime</span> <span class="identifier">xt</span> <span class="special">=</span> <span class="identifier">to_xtime_truncate</span><span class="special">(</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<pre class="programlisting"><span class="identifier">xtime</span> <span class="identifier">xt</span> <span class="special">=</span> <span class="identifier">to_xtime_truncate</span><span class="special">(</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a><span class="special">(</span><span class="number">251</span><span class="special">));</span>
<span class="identifier">print</span><span class="special">(</span><span class="identifier">xt</span><span class="special">);</span>
-<span class="identifier">milliseconds</span> <span class="identifier">ms</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">milliseconds</span> <span class="identifier">ms</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a><span class="special">>(</span><span class="identifier">from_xtime</span><span class="special">(</span><span class="identifier">xt</span><span class="special">));</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">ms</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" milliseconds\n"</span><span class="special">;</span>
<span class="identifier">xt</span> <span class="special">=</span> <span class="identifier">to_xtime_round_up</span><span class="special">(</span><span class="identifier">ms</span><span class="special">);</span>
<span class="identifier">print</span><span class="special">(</span><span class="identifier">xt</span><span class="special">);</span>
-<span class="identifier">xt</span> <span class="special">=</span> <span class="identifier">to_xtime_truncate</span><span class="special">(</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">xt</span> <span class="special">=</span> <span class="identifier">to_xtime_truncate</span><span class="special">(</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a><span class="special">(</span><span class="number">999</span><span class="special">));</span>
<span class="identifier">print</span><span class="special">(</span><span class="identifier">xt</span><span class="special">);</span>
-<span class="identifier">xt</span> <span class="special">=</span> <span class="identifier">to_xtime_round_up</span><span class="special">(</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">xt</span> <span class="special">=</span> <span class="identifier">to_xtime_round_up</span><span class="special">(</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a><span class="special">(</span><span class="number">999</span><span class="special">));</span>
<span class="identifier">print</span><span class="special">(</span><span class="identifier">xt</span><span class="special">);</span>
</pre>
@@ -951,11 +649,11 @@
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
<span class="special">{</span>
- <span class="identifier">timer</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">timer</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">></span> <span class="identifier">t1</span><span class="special">;</span>
- <span class="identifier">timer</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ <span class="identifier">timer</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">></span> <span class="identifier">t2</span><span class="special">;</span>
- <span class="identifier">timer</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
+ <span class="identifier">timer</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">></span> <span class="identifier">t3</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Strike any key: "</span><span class="special">;</span>
@@ -969,35 +667,35 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"high_resolution_clock--: "</span>
<span class="special"><<</span> <span class="identifier">t3</span><span class="special">.</span><span class="identifier">seconds</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" seconds\n"</span><span class="special">;</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d4</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d4</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d5</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d5</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\nsystem_clock latency-----------: "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">d5</span> <span class="special">-</span> <span class="identifier">d4</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
- Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d6</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
+ Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d6</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
- Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d7</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
+ Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d7</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"monotonic_clock latency--------: "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">d7</span> <span class="special">-</span> <span class="identifier">d6</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
- Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d8</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
+ Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d8</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
- Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d9</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
+ Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">d9</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.high_resolution_clock" title="
Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"high_resolution_clock latency--: "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">d9</span> <span class="special">-</span> <span class="identifier">d8</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">time_t</span> <span class="identifier">now</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">to_time_t</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">time_t</span> <span class="identifier">now</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">to_time_t</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">());</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\nsystem_clock::now() reports UTC is "</span>
@@ -1080,42 +778,41 @@
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">this_thread</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">void</span> <span class="identifier">sleep_for</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">void</span> <span class="identifier">sleep_for</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special"><</span> <span class="identifier">d</span><span class="special">)</span>
<span class="special">++</span><span class="identifier">t</span><span class="special">;</span>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special">></span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special">></span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">(</span><span class="number">0</span><span class="special">))</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"sleep_for "</span> <span class="special"><<</span> <span class="identifier">t</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" microseconds\n"</span><span class="special">;</span>
<span class="special">}</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
-<span class="keyword">void</span> <span class="identifier">sleep_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+<span class="keyword">void</span> <span class="identifier">sleep_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span><span class="special">;</span>
- <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="identifier">Time</span><span class="special">;</span>
- <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">SysTime</span><span class="special">;</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special">></span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">())</span> <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="keyword">typename</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Time</span><span class="special">::</span><span class="identifier">duration</span><span class="special">,</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Time</span><span class="special">::</span><span class="identifier">duration</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">SysTime</span><span class="special">::</span><span class="identifier">duration</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">D</span><span class="special">;</span>
<span class="comment">/* auto */</span> <span class="identifier">D</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">t</span> <span class="special">-</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
- <span class="identifier">microseconds</span> <span class="identifier">us</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">microseconds</span> <span class="identifier">us</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">us</span> <span class="special"><</span> <span class="identifier">d</span><span class="special">)</span>
<span class="special">++</span><span class="identifier">us</span><span class="special">;</span>
- <span class="identifier">SysTime</span> <span class="identifier">st</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">SysTime</span> <span class="identifier">st</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">us</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"sleep_until "</span><span class="special">;</span>
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">print_time</span><span class="special">(</span><span class="identifier">st</span><span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">st</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">st</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()).</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" microseconds away\n"</span><span class="special">;</span>
<span class="special">}</span>
<span class="special">}</span>
@@ -1130,13 +827,13 @@
<span class="comment">// ...
</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
- duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special"><=</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special"><=</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">(</span><span class="number">0</span><span class="special">))</span>
<span class="keyword">return</span> <span class="identifier">try_lock</span><span class="special">();</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"try_lock_for "</span> <span class="special"><<</span> <span class="identifier">t</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" microseconds\n"</span><span class="special">;</span>
@@ -1144,28 +841,27 @@
<span class="special">}</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span><span class="special">;</span>
- <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="identifier">Time</span><span class="special">;</span>
- <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">SysTime</span><span class="special">;</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special"><=</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">())</span>
<span class="keyword">return</span> <span class="identifier">try_lock</span><span class="special">();</span>
- <span class="keyword">typedef</span> <span class="keyword">typename</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Time</span><span class="special">::</span><span class="identifier">duration</span><span class="special">,</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Time</span><span class="special">::</span><span class="identifier">duration</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">D</span><span class="special">;</span>
<span class="comment">/* auto */</span> <span class="identifier">D</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">t</span> <span class="special">-</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
- <span class="identifier">microseconds</span> <span class="identifier">us</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">microseconds</span> <span class="identifier">us</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
- <span class="identifier">SysTime</span> <span class="identifier">st</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">SysTime</span> <span class="identifier">st</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">us</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"try_lock_until "</span><span class="special">;</span>
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">print_time</span><span class="special">(</span><span class="identifier">st</span><span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">st</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">st</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()).</span><span class="identifier">count</span><span class="special">()</span>
<span class="special"><<</span> <span class="string">" microseconds away\n"</span><span class="special">;</span>
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
@@ -1182,36 +878,35 @@
<span class="comment">// ...
</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">mutex</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">bool</span> <span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">mutex</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">microseconds</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">microseconds</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"wait_for "</span> <span class="special"><<</span> <span class="identifier">t</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" microseconds\n"</span><span class="special">;</span>
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
<span class="special">}</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="identifier">wait_until</span><span class="special">(</span><span class="identifier">mutex</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">bool</span> <span class="identifier">wait_until</span><span class="special">(</span><span class="identifier">mutex</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
- <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="identifier">Time</span><span class="special">;</span>
- <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">SysTime</span><span class="special">;</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">t</span> <span class="special"><=</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">())</span>
<span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="keyword">typename</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Time</span><span class="special">::</span><span class="identifier">duration</span><span class="special">,</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <code class="computeroutput"><span class="identifier">common_type</span></code><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Time</span><span class="special">::</span><span class="identifier">duration</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">D</span><span class="special">;</span>
<span class="comment">/* auto */</span> <span class="identifier">D</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">t</span> <span class="special">-</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
- <span class="identifier">microseconds</span> <span class="identifier">us</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
- Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <span class="identifier">microseconds</span> <span class="identifier">us</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
- <span class="identifier">SysTime</span> <span class="identifier">st</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">SysTime</span> <span class="identifier">st</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">us</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"wait_until "</span><span class="special">;</span>
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">print_time</span><span class="special">(</span><span class="identifier">st</span><span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">st</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" which is "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">st</span> <span class="special">-</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()).</span><span class="identifier">count</span><span class="special">()</span>
<span class="special"><<</span> <span class="string">" microseconds away\n"</span><span class="special">;</span>
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
@@ -1229,28 +924,28 @@
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
-<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a><span class="special">(</span><span class="number">3</span><span class="special">));</span>
-<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a><span class="special">(</span><span class="number">300</span><span class="special">));</span>
-<span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">time_limit</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">__seconds_</span><span class="special">(</span><span class="number">4</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">time_limit</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">__seconds_</span><span class="special">(</span><span class="number">4</span><span class="special">)</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a><span class="special">(</span><span class="number">500</span><span class="special">);</span>
<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_until</span><span class="special">(</span><span class="identifier">time_limit</span><span class="special">);</span>
-<span class="identifier">mut</span><span class="special">.</span><span class="identifier">try_lock_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">mut</span><span class="special">.</span><span class="identifier">try_lock_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a><span class="special">(</span><span class="number">30</span><span class="special">));</span>
<span class="identifier">mut</span><span class="special">.</span><span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">time_limit</span><span class="special">);</span>
-<span class="identifier">cv</span><span class="special">.</span><span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">m</span><span class="special">,</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="identifier">cv</span><span class="special">.</span><span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">m</span><span class="special">,</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">));</span> <span class="comment">// real code would put this in a loop
</span><span class="identifier">cv</span><span class="special">.</span><span class="identifier">wait_until</span><span class="special">(</span><span class="identifier">m</span><span class="special">,</span> <span class="identifier">time_limit</span><span class="special">);</span> <span class="comment">// real code would put this in a loop
</span>
<span class="comment">// For those who prefer floating point
-</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="number">0.25</span><span class="special">));</span>
-<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_until</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.system_clock" title="
- Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_until</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="
+ Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="number">1.5</span><span class="special">));</span>
</pre>
<p>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -39,7 +39,7 @@
Installing Chrono</a>
</h4></div></div></div>
<a name="boost_chrono.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4949634"></a>
+<a name="id4949512"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono__emphasis__">Getting
<span class="bold"><strong>Boost.Chrono</strong></span> </a>
</h5>
@@ -54,7 +54,7 @@
and follow the instructions there for anonymous SVN access.
</p>
<a name="boost_chrono.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono__emphasis___"></a><h5>
-<a name="id4949705"></a>
+<a name="id4949583"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono__emphasis___">Where
to install <span class="bold"><strong>Boost.Chrono</strong></span>? </a>
</h5>
@@ -70,7 +70,7 @@
variable. Any help is welcome.
</p>
<a name="boost_chrono.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4949760"></a>
+<a name="id4949625"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono__emphasis__">Building
<span class="bold"><strong>Boost.Chrono</strong></span> </a>
</h5>
@@ -81,7 +81,7 @@
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">libs</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">build</span>
</pre>
<a name="boost_chrono.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4949831"></a>
+<a name="id4949697"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.requirements">Requirements</a>
</h5>
<p>
@@ -115,13 +115,17 @@
<dd><p>
for operators, ...
</p></dd>
+<dt><span class="term">Boost.Ratio</span></dt>
+<dd><p>
+ for error_code, ...
+ </p></dd>
<dt><span class="term">Boost.System</span></dt>
<dd><p>
for error_code, ...
</p></dd>
<dt><span class="term">Boost.TypeTraits</span></dt>
<dd><p>
- for is_base, is_convertible ...
+ for is_base, is_convertible, common_type, ...
</p></dd>
<dt><span class="term">Boost.Utility/EnableIf</span></dt>
<dd><p>
@@ -129,21 +133,8 @@
</p></dd>
</dl>
</div>
-<p>
- <span class="bold"><strong>Boost.Chrono</strong></span> depends optionaly on:
- </p>
-<div class="variablelist">
-<p class="title"><b></b></p>
-<dl>
-<dt><span class="term">Boost.Typeof</span></dt>
-<dd><p>
- for duration and time_point registration when typeof/boost/chrono/chrono.hpp
- is include or when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined
- </p></dd>
-</dl>
-</div>
<a name="boost_chrono.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4942278"></a>
+<a name="id4942134"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono__emphasis__">Building
an executable that uses <span class="bold"><strong>Boost.Chrono</strong></span>
</a>
@@ -153,7 +144,7 @@
with the Boost.System library.
</p>
<a name="boost_chrono.users_guide.getting_started.install.exceptions_safety_"></a><h5>
-<a name="id4942313"></a>
+<a name="id4942168"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.exceptions_safety_">Exceptions
safety </a>
</h5>
@@ -162,7 +153,7 @@
of exception safety as long as the underlying parameters provide it.
</p>
<a name="boost_chrono.users_guide.getting_started.install.thread_safety_"></a><h5>
-<a name="id4942341"></a>
+<a name="id4942196"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.thread_safety_">Thread
safety </a>
</h5>
@@ -170,7 +161,7 @@
All functions in the library are thread-unsafe except when noted explicitly.
</p>
<a name="boost_chrono.users_guide.getting_started.install.tested_compilers_"></a><h5>
-<a name="id4942366"></a>
+<a name="id4942221"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.tested_compilers_">Tested
compilers </a>
</h5>
@@ -264,7 +255,7 @@
<span class="keyword">for</span> <span class="special">(</span> <span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special"><</span> <span class="number">10000000</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">sec</span> <span class="special">=</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">-</span> <span class="identifier">start</span><span class="special">;</span>
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"tooks "</span> <span class="special"><<</span> <span class="identifier">sec</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" seconds\n"</span><span class="special">;</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -27,16 +27,6 @@
<a name="boost_chrono.users_guide.tutorial"></a>Tutorial
</h3></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type">Common
- Type</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type.so_what_is__common_type__and_how_can_i_use_it_">So
- What is <code class="computeroutput"><span class="identifier">common_type</span></code> and
- How can I use it?</a></span></dt>
-<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type.how_to_get_the_common_type_of_inter_type_with_explicit_conversions_">How
- to get the common type of inter-type with explicit conversions?</a></span></dt>
-</dl></dd>
-<dt><span class="section">Ratio</span></dt>
<dt><span class="section">Duration</span></dt>
<dd><dl>
<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.duration.so_what_exactly_is_a__duration__and_how_do_i_use_one_">So
@@ -71,172 +61,6 @@
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.users_guide.tutorial.common_type"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type" title="Common
- Type">Common
- Type</a>
-</h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type.so_what_is__common_type__and_how_can_i_use_it_">So
- What is <code class="computeroutput"><span class="identifier">common_type</span></code> and
- How can I use it?</a></span></dt>
-<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type.how_to_get_the_common_type_of_inter_type_with_explicit_conversions_">How
- to get the common type of inter-type with explicit conversions?</a></span></dt>
-</dl></div>
-<p>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> has been a recurring
- theme in many places for many years. We've previously known it as promote
- and examples of it are spread throughout boost. It has been reinvented
- independently several times, because it is so useful.
- </p>
-<p>
- Andrei Alexandrescu recently pointed us at a D library: std.traits - D
- Programming Language - Digital Mars, which became the motivation for this
- particular name, and the variadic nature of <a href="http://www.digitalmars.com/d/2.0/phobos/std_traits.html#CommonType" target="_top">this
- trait</a>.
- </p>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.users_guide.tutorial.common_type.so_what_is__common_type__and_how_can_i_use_it_"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type.so_what_is__common_type__and_how_can_i_use_it_" title="So
- What is common_type and
- How can I use it?">So
- What is <code class="computeroutput"><span class="identifier">common_type</span></code> and
- How can I use it?</a>
-</h5></div></div></div>
-<p>
- In a nutshell, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> is a trait that
- takes 1 or more types, and returns a type which all of the types will
- convert to. The default definition demands this conversion be implicit.
- However the trait can be specialized for user-defined types which want
- to limit their inter-type conversions to explicit, and yet still want
- to interoperate with the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> facility.
- </p>
-<p>
- <span class="bold"><strong>Example:</strong></span>
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
-<span class="keyword">typename</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">complex</span><span class="special"><</span><span class="identifier">T</span><span class="special">>,</span> <span class="identifier">complex</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
-<span class="keyword">operator</span><span class="special">+(</span><span class="identifier">complex</span><span class="special"><</span><span class="identifier">T</span><span class="special">>,</span> <span class="identifier">complex</span><span class="special"><</span><span class="identifier">U</span><span class="special">>);</span>
-</pre>
-<p>
- In the above example, "mixed-mode" complex arithmetic is allowed.
- The return type is described by <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a>. For example the
- resulting type of adding a <code class="computeroutput"><span class="identifier">complex</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code> and <code class="computeroutput"><span class="identifier">complex</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span></code> might be a <code class="computeroutput"><span class="identifier">complex</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span></code>. Another choice for the author might
- be:
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
-<span class="identifier">complex</span><span class="special"><</span><span class="keyword">typename</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">U</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
-<span class="keyword">operator</span><span class="special">+(</span><span class="identifier">complex</span><span class="special"><</span><span class="identifier">T</span><span class="special">>,</span> <span class="identifier">complex</span><span class="special"><</span><span class="identifier">U</span><span class="special">>);</span>
-</pre>
-<p>
- Here is how someone might produce a variadic comparison function:
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="special">...</span><span class="identifier">T</span><span class="special">></span>
-<span class="keyword">typename</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">...>::</span><span class="identifier">type</span>
-<span class="identifier">min</span><span class="special">(</span><span class="identifier">T</span><span class="special">...</span> <span class="identifier">t</span><span class="special">);</span>
-</pre>
-<p>
- This is a very useful and broadly applicable utility. The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> facilities use it
- to make multi-precision arithmetic seamless and exact.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.users_guide.tutorial.common_type.how_to_get_the_common_type_of_inter_type_with_explicit_conversions_"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.common_type.how_to_get_the_common_type_of_inter_type_with_explicit_conversions_" title="How
- to get the common type of inter-type with explicit conversions?">How
- to get the common type of inter-type with explicit conversions?</a>
-</h5></div></div></div>
-<p>
- The default definition of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> demands the conversion
- be implicit. However the trait can be specialized for user-defined types
- which want to limit their inter-type conversions to explicit, and yet
- still want to interoperate with the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> facility.
- </p>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.users_guide.tutorial.ratio"></a>Ratio
-</h4></div></div></div>
-<p>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> is a general purpose utility
- inspired by Walter Brown allowing one to easily and safely compute rational
- values at compile time. The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> class catches all errors
- (such as divide by zero and overflow) at compile time. It is used in the
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> classes to efficiently
- create units of time. It can also be used in other "quantity"
- libraries (both std-defined and user-defined), or anywhere there is a rational
- constant which is known at compile time. The use of this utility can greatly
- reduce the chances of run time overflow because the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> (and any ratios resulting
- from <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> arithmetic) are always reduced
- to lowest terms.
- </p>
-<p>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> is a template taking two
- intmax_ts, with the second defaulted to 1. In addition to copy constructors
- and assignement, it only has two public members, both of which are static
- const intmax_t. One is the numerator of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> and the other is the denominator.
- The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> is always normalized such
- that it is expressed in lowest terms, and the denominator is always positive.
- When the numerator is 0, the denominator is always 1.
- </p>
-<p>
- <span class="bold"><strong>Example:</strong></span>
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">5</span><span class="special">,</span> <span class="number">3</span><span class="special">></span> <span class="identifier">five_thirds</span><span class="special">;</span>
-<span class="comment">// five_thirds::num == 5, five_thirds::den == 3
-</span>
-<span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">25</span><span class="special">,</span> <span class="number">15</span><span class="special">></span> <span class="identifier">also_five_thirds</span><span class="special">;</span>
-<span class="comment">// also_five_thirds::num == 5, also_five_thirds::den == 3
-</span>
-<span class="keyword">typedef</span> <span class="identifier">ratio_divide</span><span class="special"><</span><span class="identifier">five_thirds</span><span class="special">,</span> <span class="identifier">also_five_thirds</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">one</span><span class="special">;</span>
-<span class="comment">// one::num == 1, one::den == 1
-</span></pre>
-<p>
- This facility also includes convenience typedefs for the SI prefixes <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">atto</span></code></a> through <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">exa</span></code></a> corresponding to their internationally
- recognized definitions (in terms of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a>). This is a tremendous syntactic
- convenience. It will prevent errors in specifying constants as one no longer
- has to double count the number of zeros when trying to write million or
- billion.
- </p>
-<p>
- <span class="bold"><strong>Example:</strong></span>
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">ratio_multiply</span><span class="special"><</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">5</span><span class="special">>,</span> <span class="identifier">giga</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">_5giga</span><span class="special">;</span>
-<span class="comment">// _5giga::num == 5000000000, _5giga::den == 1
-</span>
-<span class="keyword">typedef</span> <span class="identifier">ratio_multiply</span><span class="special"><</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">5</span><span class="special">>,</span> <span class="identifier">nano</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">_5nano</span><span class="special">;</span>
-<span class="comment">// _5nano::num == 1, _5nano::den == 200000000
-</span></pre>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
<a name="boost_chrono.users_guide.tutorial.duration"></a>Duration
</h4></div></div></div>
<div class="toc"><dl>
@@ -259,41 +83,41 @@
parameter?</a></span></dt>
</dl></div>
<p>
- The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> is the heart of this
library. The interface that the user will see in everyday use is nearly
- identical to that of Boost.DateTime time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ identical to that of Boost.DateTime time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> authored by Jeff Garland,
both in syntax and in behavior. This has been a very popular boost library
for 7 years. There is an enormous positive history with this interface.
</p>
<p>
- The library consists of six units of time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ The library consists of six units of time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a>
</li>
<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a>
</li>
<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">seconds</span></code></a>
</li>
<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a>
</li>
<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a>
</li>
<li>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>
</li>
</ul></div>
@@ -302,13 +126,13 @@
the most common units used when sleeping, waiting on a condition variable,
or waiting to obtain the lock on a mutex. Each of these units is nothing
but a thin wrapper around a signed integral count. That is, when you construct
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a><code class="computeroutput"><span class="special">(</span><span class="number">3</span><span class="special">)</span></code>, all that
happens is a <code class="computeroutput"><span class="number">3</span></code> is stored inside
- of minutes. When you construct <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ of minutes. When you construct <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a><code class="computeroutput"><span class="special">(</span><span class="number">3</span><span class="special">)</span></code>, all that
happens is a <code class="computeroutput"><span class="number">3</span></code> is stored inside
- of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a>.
</p>
<p>
@@ -316,16 +140,16 @@
to one another. At this time, unit-specific compile-time conversion constants
are used to convert the source unit to the target unit. Only conversions
from coarser units to finer units are allowed (in boost). This restriction
- ensures that all conversions are always exact. That is, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ ensures that all conversions are always exact. That is, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">microseconds</span></code></a> can always represent
- any value <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ any value <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">minutes</span></code></a> has.
</p>
<p>
In Boost.DateTime, these units are united via inheritance. <span class="bold"><strong>Boost.Chrono</strong></span>
- instead unites these units through the class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ instead unites these units through the class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>. That is, in <span class="bold"><strong>Boost.Chrono</strong></span> all six of the above units are nothing
- but typedefs to different instantiations of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ but typedefs to different instantiations of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>. This change from Boost.DateTime
has a far reaching positive impact, while not changing the syntax of the
everyday use at all.
@@ -333,30 +157,28 @@
<p>
The most immediate positive impact is that the library can immediately
generate any unit, any precision it needs. This is sometimes necessary
- when doing comparisons or arithmetic between <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ when doing comparisons or arithmetic between <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> of differing precision,
assuming one wants the comparison and arithmetic to be exactly correct.
</p>
<p>
- A secondary benefit is that by publishing the class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ A secondary benefit is that by publishing the class template <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> interface, user code
- can very easily create <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ can very easily create <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> with any precision
- they desire. The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> utility is used to specify
- the precision, so as long as the precision can be expressed by a rational
- constant with respect to seconds, this framework can exactly represent
- it (one third of a second is no problem, and neither is one third of a
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio_si_typedefs" title="
- SI typedefs"><code class="computeroutput"><span class="identifier">femto</span></code></a> second). All of this utility
- and flexibility comes at no cost just by making use of the no-run-time-overhead
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> facility.
+ they desire. The <code class="computeroutput"><span class="identifier">ratio</span></code>
+ utility is used to specify the precision, so as long as the precision can
+ be expressed by a rational constant with respect to seconds, this framework
+ can exactly represent it (one third of a second is no problem, and neither
+ is one third of a <code class="computeroutput"><span class="identifier">femto</span></code>
+ second). All of this utility and flexibility comes at no cost just by making
+ use of the no-run-time-overhead <code class="computeroutput"><span class="identifier">ratio</span></code>
+ facility.
</p>
<p>
- In Boost.DateTime, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ In Boost.DateTime, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a> does not have the same representation
- as <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ as <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>. The former is usually
represented with a <code class="computeroutput"><span class="keyword">long</span></code> whereas
a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
@@ -367,14 +189,14 @@
</p>
<p>
<span class="bold"><strong>Boost.Chrono</strong></span> continues, and generalizes
- that philosophy. Not only can one specify the precision of a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ that philosophy. Not only can one specify the precision of a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, one can also specify
its representation. This can be any integral type, or even a floating point
type. Or it can be a user-defined type which emulates an arithmetic type.
The six predefined units all use signed integral types as their representation.
- And they all have a minimum range of +/- 292 years. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ And they all have a minimum range of +/- 292 years. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a> needs 64 bits to cover
- that range. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ that range. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a> needs only 23 bits to cover
that range.
</p>
@@ -387,42 +209,38 @@
and How Do I Use One?</a>
</h5></div></div></div>
<p>
- A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> has a representation
and a tick period (precision).
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="keyword">class</span> <span class="identifier">duration</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">=</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="keyword">class</span> <span class="identifier">duration</span><span class="special">;</span>
</pre>
<p>
The representation is simply any arithmetic type, or an emulation of
such a type. The representation stores a count of ticks. This count is
- the only data member stored in a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ the only data member stored in a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>. If the representation
is floating point, it can store fractions of a tick to the precision
- of the representation. The tick period is represented by a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> and is encoded into the
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ of the representation. The tick period is represented by a <code class="computeroutput"><span class="identifier">ratio</span></code> and is encoded into the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>'s type, instead of
- stored. The tick period only has an impact on the behavior of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ stored. The tick period only has an impact on the behavior of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> when a conversion between
- different <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ different <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>'s is attempted. The
tick period is completely ignored when simply doing arithmetic among
- like <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ like <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>.
</p>
<p>
<span class="bold"><strong>Example:</strong></span>
</p>
-<pre class="programlisting"><span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">minutes</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">minutes</span><span class="special">;</span>
<span class="identifier">minutes</span> <span class="identifier">m1</span><span class="special">(</span><span class="number">3</span><span class="special">);</span> <span class="comment">// m1 stores 3
</span><span class="identifier">minutes</span> <span class="identifier">m2</span><span class="special">(</span><span class="number">2</span><span class="special">);</span> <span class="comment">// m2 stores 2
</span><span class="identifier">minutes</span> <span class="identifier">m3</span> <span class="special">=</span> <span class="identifier">m1</span> <span class="special">+</span> <span class="identifier">m2</span><span class="special">;</span> <span class="comment">// m3 stores 5
</span>
-<span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">,</span> <span class="identifier">micro</span><span class="special">></span> <span class="identifier">microseconds</span><span class="special">;</span>
<span class="identifier">microseconds</span> <span class="identifier">us1</span><span class="special">(</span><span class="number">3</span><span class="special">);</span> <span class="comment">// us1 stores 3
</span><span class="identifier">microseconds</span> <span class="identifier">us2</span><span class="special">(</span><span class="number">2</span><span class="special">);</span> <span class="comment">// us2 stores 2
@@ -435,7 +253,7 @@
minutes to microseconds, resulting in a relatively large number of microseconds.
</p>
<p>
- If you need to access the tick count within a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ If you need to access the tick count within a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, there is a member
<code class="computeroutput"><span class="identifier">count</span><span class="special">()</span></code>
which simply returns the stored tick count.
@@ -443,10 +261,10 @@
<pre class="programlisting"><span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">tc</span> <span class="special">=</span> <span class="identifier">us4</span><span class="special">.</span><span class="identifier">count</span><span class="special">();</span> <span class="comment">// tc is 300000005
</span></pre>
<p>
- These <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ These <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> have very simple,
very predictable, and very observable behavior. After all, this is really
- nothing but the time tested interface of Jeff's boost time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ nothing but the time tested interface of Jeff's boost time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> library (unified with
templates instead of inheritance).
</p>
@@ -473,27 +291,27 @@
fractional part gets silently discarded.
</p>
<a name="boost_chrono.users_guide.tutorial.duration.what_happens_if_i_assign__m3___us3__to__minutes__instead_of__microseconds__.but_what_if_the_truncation_behavior_is_what_i_want_to_do_"></a><h6>
-<a name="id4998851"></a>
+<a name="id4997417"></a>
<a href="tutorial.html#boost_chrono.users_guide.tutorial.duration.what_happens_if_i_assign__m3___us3__to__minutes__instead_of__microseconds__.but_what_if_the_truncation_behavior_is_what_i_want_to_do_">But
what if the truncation behavior is what I want to do?</a>
</h6>
<p>
- There is a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ There is a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a> facility to explicitly
ask for this behavior:
</p>
-<pre class="programlisting"><span class="identifier">minutes</span> <span class="identifier">m4</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+<pre class="programlisting"><span class="identifier">minutes</span> <span class="identifier">m4</span> <span class="special">=</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">minutes</span><span class="special">>(</span><span class="identifier">m3</span> <span class="special">+</span> <span class="identifier">us3</span><span class="special">);</span> <span class="comment">// m4.count() == 5
</span></pre>
<p>
- In general, one can perform <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ In general, one can perform <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> arithmetic at will.
- If <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ If <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a> isn't used, and
it compiles, the arithmetic is exact. Any place one wants to override
- this exact arithmetic behavior, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ this exact arithmetic behavior, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a> can be used to
- explicitly specify that desire. The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ explicitly specify that desire. The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a> has the same efficiency
as the implicit conversion, and will even be exact as often as it can.
</p>
@@ -514,9 +332,8 @@
Not a problem. When the destination of a conversion has floating point
representation, all conversions are allowed to happen implicitly.
</p>
-<pre class="programlisting"><span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">dminutes</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">typedef</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special"><</span><span class="number">60</span><span class="special">></span> <span class="special">></span> <span class="identifier">dminutes</span><span class="special">;</span>
<span class="identifier">dminutes</span> <span class="identifier">dm4</span> <span class="special">=</span> <span class="identifier">m3</span> <span class="special">+</span> <span class="identifier">us3</span><span class="special">;</span> <span class="comment">// dm4.count() == 5.000000083333333
</span></pre>
</div>
@@ -528,12 +345,12 @@
</h5></div></div></div>
<p>
If you were writing these conversions by hand, you could not make it
- more efficient. The use of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> ensures that all conversion
- constants are simplified as much as possible at compile time. This usually
- results in the numerator or denominator of the conversion factor simplifying
- to <code class="computeroutput"><span class="number">1</span></code>, and being subsequently
- ignored in converting the run time values of the tick counts.
+ more efficient. The use of <code class="computeroutput"><span class="identifier">ratio</span></code>
+ ensures that all conversion constants are simplified as much as possible
+ at compile time. This usually results in the numerator or denominator
+ of the conversion factor simplifying to <code class="computeroutput"><span class="number">1</span></code>,
+ and being subsequently ignored in converting the run time values of the
+ tick counts.
</p>
</div>
<div class="section" lang="en">
@@ -548,11 +365,11 @@
There are several options open to the user:
</p>
<div class="itemizedlist"><ul type="disc"><li>
- If the author of the function wants to accept any <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ If the author of the function wants to accept any <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, and is willing
- to work in floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ to work in floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>, he can simply
- use any floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ use any floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> as the parameter:
</li></ul></div>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">duration</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">d</span><span class="special">)</span> <span class="comment">// accept floating point seconds
@@ -564,7 +381,7 @@
</pre>
<div class="itemizedlist"><ul type="disc"><li>
If the author of the function wants to traffic only in integral
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>, and is content
with handling nothing finer than say nanoseconds (just as an example),
he can simply specify nanoseconds as the parameter:
@@ -577,20 +394,20 @@
<span class="identifier">f</span><span class="special">(</span><span class="identifier">microseconds</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
</pre>
<p>
- In this design, if the client wants to pass in a floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, or a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ In this design, if the client wants to pass in a floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, or a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> of finer precision
than nanoseconds, then the client is responsible for choosing his own
rounding mode in the conversion to nanoseconds.
</p>
-<pre class="programlisting"> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">s</span><span class="special">(</span><span class="number">1.</span><span class="special">/</span><span class="number">3</span><span class="special">);</span> <span class="comment">// 1/3 of a second
</span><span class="identifier">f</span><span class="special">(</span><span class="identifier">duration_cast</span><span class="special"><</span><span class="identifier">nanoseconds</span><span class="special">>(</span><span class="identifier">s</span><span class="special">));</span> <span class="comment">// round towards zero in conversion to nanoseconds
</span></pre>
<p>
In the example above, the client of f has chosen "round towards
zero" as the desired rounding mode to nanoseconds. If the client
- has a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ has a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> that won't exactly
convert to nanoseconds, and fails to choose how the conversion will take
place, the compiler will refuse the call:
@@ -598,13 +415,13 @@
<pre class="programlisting"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span> <span class="comment">// does not compile
</span></pre>
<div class="itemizedlist"><ul type="disc"><li>
- If the author of the function wants to accept any <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ If the author of the function wants to accept any <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, but wants to work
with integral representations and wants to control the rounding mode
internally, then he can template the function:
</li></ul></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="identifier">d</span><span class="special">)</span>
<span class="special">{</span>
<span class="comment">// convert d to nanoseconds, rounding up if it is not an exact conversion
@@ -614,17 +431,17 @@
<span class="comment">// ns.count() == 333333334 when passed 1/3 of a floating point second
</span><span class="special">}</span>
-<span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="number">1.</span><span class="special">/</span><span class="number">3</span><span class="special">));</span>
</pre>
<div class="itemizedlist"><ul type="disc"><li>
If the author in the example does not want to accept floating point
- based <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ based <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a>, he can enforce
that behavior like so:
</li></ul></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
-<span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="identifier">d</span><span class="special">)</span>
<span class="special">{</span>
<span class="comment">// convert d to nanoseconds, rounding up if it is not an exact conversion
@@ -634,20 +451,20 @@
<span class="comment">// ns.count() == 333333334 when passed 333333333333 picoseconds
</span><span class="special">}</span>
-<span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">f</span><span class="special">(</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">,</span> <span class="identifier">pico</span><span class="special">>(</span><span class="number">333333333333</span><span class="special">));</span> <span class="comment">// About 1/3 of a second worth of picoseconds
</span></pre>
<p>
- Clients with floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Clients with floating point <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> who want to use f
- will now have to convert to an integral <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ will now have to convert to an integral <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> themselves before passing
the result to f.
</p>
<p>
In summary, the author of f has quite a bit of flexibility and control
in the interface he wants to provide his clients with, and easy options
- for manipulating that <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ for manipulating that <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> internal to his function.
</p>
</div>
@@ -657,14 +474,14 @@
<a name="boost_chrono.users_guide.tutorial.clocks"></a>Clocks
</h4></div></div></div>
<p>
- While <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ While <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code>'s</a> only have precision
- and representation to concern themselves, clocks and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ and representation to concern themselves, clocks and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> are intimately related
and refer to one another. Because clocks are simpler to explain, we will
- do so first without fully explaining <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ do so first without fully explaining <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a>. Once clocks are
- introduced, it will be easier to then fill in what a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ introduced, it will be easier to then fill in what a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> is.
</p>
<p>
@@ -672,15 +489,15 @@
</p>
<div class="orderedlist"><ol type="1">
<li>
- A concrete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ A concrete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> type.
</li>
<li>
- A concrete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ A concrete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> type.
</li>
<li>
- A function called now() which returns the concrete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ A function called now() which returns the concrete <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>.
</li>
</ol></div>
@@ -710,10 +527,10 @@
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">an</span> <span class="identifier">arithmetic</span><span class="special">-</span><span class="identifier">like</span> <span class="identifier">type</span> <span class="identifier">rep</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">an</span> <span class="identifier">instantiation</span> <span class="identifier">of</span> <span class="identifier">ratio</span> <span class="identifier">period</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">rep</span><span class="special">,</span> <span class="identifier">period</span><span class="special">></span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">rep</span><span class="special">,</span> <span class="identifier">period</span><span class="special">></span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="identifier">time_point</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_monotonic</span> <span class="special">=</span> <span class="keyword">true</span> <span class="keyword">or</span> <span class="keyword">false</span><span class="special">;</span>
@@ -726,15 +543,15 @@
<pre class="programlisting"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">t1</span> <span class="special">=</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
</pre>
<p>
- And one can get the time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> between two <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ And one can get the time <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> between two <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> associated with Clock
with:
</p>
<pre class="programlisting"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">t1</span> <span class="special">-</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
</pre>
<p>
- And one can specify a past or future <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ And one can specify a past or future <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> with:
</p>
<pre class="programlisting"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">t2</span> <span class="special">=</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">d</span><span class="special">;</span>
@@ -743,8 +560,8 @@
Note how even if a particular clock becomes obsolete, the next clock in
line will have the same API. There is no new learning curve to come up.
The only source code changes will be simply changing the type of the clock.
- The same <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ The same <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> and <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> framework continues
to work as new clocks are introduced. And multiple clocks are safely and
easily handled within the same program.
@@ -765,14 +582,14 @@
thread between end and start?</a></span></dt>
</dl></div>
<p>
- A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> represents a point
- in time, as opposed to a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ in time, as opposed to a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> of time. Another way
- of saying the same thing, is that a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ of saying the same thing, is that a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> represents an epoch
- plus or minus a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>. Examples of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ plus or minus a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>. Examples of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> include:
</p>
<div class="itemizedlist"><ul type="disc">
@@ -790,20 +607,20 @@
In each of the examples above, a different epoch is implied. Sometimes
an epoch has meaning for several millennia. Other times the meaning of
an epoch is lost after a while (such as the start of a timer, or when the
- computer booted). However, if two <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ computer booted). However, if two <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> are known to share
- the same epoch, they can be subtracted, yielding a valid <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ the same epoch, they can be subtracted, yielding a valid <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>, even if the definition
of the epoch no longer has meaning.
</p>
<p>
In <span class="bold"><strong>Boost.Chrono</strong></span>, an epoch is a purely
abstract and unspecified concept. There is no type representing an epoch.
- It is simply an idea that relates (or doesn't) <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ It is simply an idea that relates (or doesn't) <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> to a clock, and in
- the case that they share a clock, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ the case that they share a clock, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> to one another.
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> associated with different
clocks are generally not interoperable unless the relationship between
the epochs associated with each clock is known.
@@ -817,47 +634,47 @@
and How Do I Use One?</a>
</h5></div></div></div>
<p>
- A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> has a clock and a
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>.
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">time_point</span><span class="special">;</span>
</pre>
<p>
- The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ The <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>'s clock is not stored.
- It is simply embedded into the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ It is simply embedded into the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>'s type and serves
two purposes:
</p>
<div class="orderedlist"><ol type="1">
<li>
- Because <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ Because <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> originating
from different clocks have different types, the compiler can be instructed
- to fail if incompatible <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ to fail if incompatible <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> are used in
inappropriate ways.
</li>
<li>
- Given a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ Given a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>, one often needs
- to compare that <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ to compare that <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> to "now".
- This is very simple as long as the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ This is very simple as long as the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a> knows what clock
it is defined with respect to.
</li>
</ol></div>
<p>
- A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>'s <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ A <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>'s <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> is stored as the only
- data member of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
- Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>. Thus <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ data member of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
+ Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code></a>. Thus <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> and their corresponding
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> have exactly the same
layout. But they have very different meanings. For example, it is one
thing to say I want to sleep for 3 minutes. It is a completely different
@@ -875,20 +692,20 @@
<span class="identifier">monotonic_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">start</span> <span class="special">=</span> <span class="identifier">monotonic_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">();</span>
<span class="identifier">g</span><span class="special">();</span>
<span class="identifier">h</span><span class="special">();</span>
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">sec</span> <span class="special">=</span> <span class="identifier">monotonic_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">-</span> <span class="identifier">start</span><span class="special">;</span>
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"f() took "</span> <span class="special"><<</span> <span class="identifier">sec</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" seconds\n"</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
- Note that if one is using the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Note that if one is using the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> between two clock
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.time_point" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.time_point_hpp.time_point" title="
Class template time_point<>"><code class="computeroutput"><span class="identifier">time_point</span></code>'s</a> in a way where
- the precision of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ the precision of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> matters, it is good
- practice to convert the clock's native <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
- Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> to a known <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ practice to convert the clock's native <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> to a known <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a>. This insulates the
code from future changes which may be made to the clock's native precision
in the future. For example monotonic_clock could easily be based on the
@@ -908,7 +725,7 @@
<p>
The above code will delay as close as possible to half a microsecond,
no matter what the precision of monotonic_clock is. The more precise
- <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.monotonic_clock" title="
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.system_clocks_hpp.monotonic_clock" title="
Class monotonic_clock"><code class="computeroutput"><span class="identifier">monotonic_clock</span></code></a> becomes, the
more accurate will be the delay to 500 nanoseconds.
</p>
@@ -922,16 +739,16 @@
thread between end and start?</a>
</h5></div></div></div>
<p>
- You can use <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ You can use <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><code class="computeroutput"><span class="special"><></span></code>
to convert the <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><code class="computeroutput"><span class="special">::</span><span class="identifier">duration</span></code> into whatever units you desire.
This facility will round down (truncate) if an exact conversion is not
possible. Ex:
</p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a> <span class="identifier">ms</span><span class="special">;</span>
-<span class="identifier">ms</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+<span class="identifier">ms</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">ms</span><span class="special">>(</span><span class="identifier">end</span> <span class="special">-</span> <span class="identifier">start</span><span class="special">);</span>
<span class="comment">// d now holds the number of milliseconds from start to end.
@@ -940,33 +757,33 @@
</pre>
<p>
As <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
- Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">duration</span></code> is <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">duration</span></code> is <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>, we can convert
- to <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ to <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>, or some integral-based
- duration which <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ duration which <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a> will always exactly
- convert to, then <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ convert to, then <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><code class="computeroutput"><span class="special"><></span></code>
is unnecessary:
</p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a> <span class="identifier">ns</span><span class="special">;</span>
<span class="identifier">ns</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">end</span> <span class="special">-</span> <span class="identifier">start</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">ns</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">"ns\n"</span><span class="special">;</span>
</pre>
<p>
If you need seconds with a floating point representation you can also
- eliminate the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ eliminate the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><code class="computeroutput"><span class="special"><></span></code>:
</p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">sec</span><span class="special">;</span> <span class="comment">// seconds, stored with a double
</span><span class="identifier">sec</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">end</span> <span class="special">-</span> <span class="identifier">start</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">sec</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">"s\n"</span><span class="special">;</span>
</pre>
<p>
- If you're not sure if you need <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ If you're not sure if you need <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><code class="computeroutput"><span class="special"><></span></code>
or not, feel free to try it without. If the conversion is exact, or if
the destination has a floating point representation, it will compile.
@@ -977,11 +794,8 @@
Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">duration</span></code>, you can get the representation
type with <code class="computeroutput"><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">rep</span></code>, and the tick period with <code class="computeroutput"><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
- Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">period</span></code> (which should be a type <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> which has nested values
- <code class="computeroutput"><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">::</span><span class="identifier">num</span></code> and <code class="computeroutput"><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">::</span><span class="identifier">den</span></code>). The tick period of <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">period</span></code> (which should be a type <code class="computeroutput"><span class="identifier">ratio</span></code> which has nested values <code class="computeroutput"><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special">::</span><span class="identifier">num</span></code> and <code class="computeroutput"><code class="computeroutput"><span class="identifier">ratio</span></code><span class="special">::</span><span class="identifier">den</span></code>).
+ The tick period of <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> is <code class="computeroutput"><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">period</span><span class="special">::</span><span class="identifier">num</span> <span class="special">/</span> <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">period</span><span class="special">::</span><span class="identifier">den</span></code> seconds: 1/1000000000 in this case
@@ -989,7 +803,7 @@
stored in a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>.
</p>
<p>
- If you need to use <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ If you need to use <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><code class="computeroutput"><span class="special"><></span></code>,
but want to round up, instead of down when the conversion is inexact,
here is a handy little helper function to do so. Writing it is actually
@@ -997,18 +811,18 @@
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ToDuration</span><span class="special">,</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span>
<span class="identifier">ToDuration</span>
-<span class="identifier">round_up</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+<span class="identifier">round_up</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="identifier">d</span><span class="special">)</span>
<span class="special">{</span>
<span class="comment">// first round down
-</span> <span class="identifier">ToDuration</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+</span> <span class="identifier">ToDuration</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><span class="special"><</span><span class="identifier">ToDuration</span><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">result</span> <span class="special"><</span> <span class="identifier">d</span><span class="special">)</span> <span class="comment">// comparisons are *always* exact
</span> <span class="special">++</span><span class="identifier">result</span><span class="special">;</span> <span class="comment">// increment by one tick period
</span> <span class="keyword">return</span> <span class="identifier">result</span><span class="special">;</span>
<span class="special">}</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.duration_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a> <span class="identifier">ms</span><span class="special">;</span>
<span class="identifier">ms</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">round_up</span><span class="special"><</span><span class="identifier">ms</span><span class="special">>(</span><span class="identifier">end</span> <span class="special">-</span> <span class="identifier">start</span><span class="special">);</span>
<span class="comment">// d now holds the number of milliseconds from start to end, rounded up.
Modified: sandbox/chrono/libs/chrono/doc/html/index.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/index.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/index.html 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -79,8 +79,7 @@
Acknowledgements</a></span></dt>
<dt><span class="section"> Appendix F: Tests</span></dt>
<dt><span class="section"> Appendix G: Tickets</span></dt>
-<dt><span class="section"> Appendix H: Performances</span></dt>
-<dt><span class="section"> Appendix I: Future plans</span></dt>
+<dt><span class="section"> Appendix H: Future plans</span></dt>
</dl></dd>
</dl>
</div>
@@ -95,7 +94,7 @@
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: September 05, 2010 at 09:59:08 GMT</small></p></td>
+<td align="left"><p><small>Last revised: September 05, 2010 at 19:33:23 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest (original)
+++ sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest 2010-09-05 15:40:41 EDT (Sun, 05 Sep 2010)
@@ -19,5 +19,4 @@
boost_chrono/appendices/acknowledgements.html
boost_chrono/appendices/tests.html
boost_chrono/appendices/tickets.html
-boost_chrono/appendices/perf.html
boost_chrono/appendices/todo.html
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