|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60435 - branches/units/autoprefix/libs/units/doc
From: pbristow_at_[hidden]
Date: 2010-03-10 13:01:49
Author: pbristow
Date: 2010-03-10 13:01:48 EST (Wed, 10 Mar 2010)
New Revision: 60435
URL: http://svn.boost.org/trac/boost/changeset/60435
Log:
Added autoprefix and added more comments. \detailed changed to \details to satisfy Doxygen.
Text files modified:
branches/units/autoprefix/libs/units/doc/units.qbk | 480 +++++++++++++++++++++++----------------
1 files changed, 280 insertions(+), 200 deletions(-)
Modified: branches/units/autoprefix/libs/units/doc/units.qbk
==============================================================================
--- branches/units/autoprefix/libs/units/doc/units.qbk (original)
+++ branches/units/autoprefix/libs/units/doc/units.qbk 2010-03-10 13:01:48 EST (Wed, 10 Mar 2010)
@@ -1,9 +1,9 @@
[library Boost.Units
- [quickbook 1.3]
- [version 1.0.0]
+ [quickbook 1.5]
+ [version 1.1.0]
[authors [Schabel, Matthias C.]]
[authors [Watanabe, Steven]]
- [copyright 2003-2008 Matthias Christian Schabel, 2007-2008 Steven Watanabe]
+ [copyright 2003-2008 Matthias Christian Schabel, 2007-2010 Steven Watanabe]
[license
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
@@ -12,10 +12,15 @@
[purpose zero-overhead compile-time dimensional analysis and unit computations]
]
+[/ Some links to external sources.]
+[def __boost [@http://www.boost.org/ Boost]]
+[def __boostroot [@boost: Boost root]]
+[def __boostlicense [@http://www.boost.org/LICENSE_1_0.txt Boost License]]
[def __boost_mpl [@http://www.boost.org/libs/mpl/doc/index.html Boost Metaprogramming Library]]
[def __mpl_forward_sequence [@http://www.boost.org/libs/mpl/doc/refmanual/forward-sequence.html MPL Forward Sequence]]
+[/Links within this document.]
[def __ordinal [classref boost::units::ordinal ordinal]]
[def __dim [classref boost::units::dim dim]]
[def __static_rational [classref boost::units::static_rational static_rational]]
@@ -61,27 +66,26 @@
[def __unscale [classref boost::units::unscale unscale]]
[def __BOOST_UNITS_STATIC_CONSTANT [macroref BOOST_UNITS_STATIC_CONSTANT]]
-
[def __BOOST_UNITS_DEFINE_CONVERSION_FACTOR [macroref BOOST_UNITS_DEFINE_CONVERSION_FACTOR]]
[def __BOOST_UNITS_DEFINE_CONVERSION_FACTOR_TEMPLATE [macroref BOOST_UNITS_DEFINE_CONVERSION_FACTOR_TEMPLATE]]
[def __BOOST_UNITS_DEFAULT_CONVERSION [macroref BOOST_UNITS_DEFAULT_CONVERSION]]
[section:Introduction Introduction]
-The Boost.Units library is a C++ implementation of dimensional analysis in a general
+The Boost.Units library is a C++ implementation of dimensional analysis in a general
and extensible manner, treating it as a generic compile-time metaprogramming problem. With appropriate
compiler optimization, no runtime execution cost is introduced, facilitating the use of this library to
provide dimension checking in performance-critical code. Support for units
-and quantities (defined as a unit and associated value) for arbitrary unit system models and arbitrary
-value types is provided, as is a fine-grained general facility for unit conversions. Complete SI and CGS unit
-systems are provided, along with systems for
-angles measured in degrees, radians, gradians, and revolutions and
-systems for temperatures measured in Kelvin, degrees Celsius and degrees Fahrenheit.
+and quantities (defined as a unit and associated value) for arbitrary unit system models and arbitrary
+value types is provided, as is a fine-grained general facility for unit conversions. Complete SI and CGS unit
+systems are provided, along with systems for
+angles measured in degrees, radians, gradians, and revolutions and
+systems for temperatures measured in Kelvin, degrees Celsius and degrees Fahrenheit.
The library architecture has been designed with flexibility and extensibility in mind; demonstrations of the ease
of adding new units and unit conversions are provided in the examples.
In order to enable complex compile-time dimensional analysis calculations with no runtime overhead,
-Boost.Units relies heavily on the [___boost_mpl] (MPL) and on template metaprogramming techniques, and is, as a consequence,
+Boost.Units relies heavily on the [___boost_mpl] (MPL) and on template metaprogramming techniques, and is, as a consequence,
fairly demanding of compiler compliance to ISO standards. At present, it has been successfully
compiled and tested on the following compilers/platforms :
@@ -90,7 +94,7 @@
# g++ 3.4.4, 4.2.3, and 4.3.0 on Windows XP
# Microsoft Visual C++ 7.1, 8.0, and 9.0 on Windows XP
# Comeau 4.3.10.1 beta2 on Windows XP
-# Metrowerks CodeWarrior 9.2 on Windows XP.
+# Metrowerks CodeWarrior 9.2 on Windows XP.
# Sun CC 5.9 on Solaris and Linux
The following compilers/platforms are known *not* to work :
@@ -108,32 +112,33 @@
Before discussing the basics of the library, we first define a few terms that will be used frequently
in the following :
-* *Base dimension* : A base dimension is loosely defined as a measurable entity of interest; in conventional
+* *Base dimension* : A base dimension is loosely defined as a measurable entity of interest; in conventional
dimensional analysis, base dimensions include length (\[L\]), mass (\[M\]), time (\[T\]), etc... but there is
- no specific restriction on what base dimensions can be used. Base dimensions are essentially a tag type and
+ no specific restriction on what base dimensions can be used. Base dimensions are essentially a tag type and
provide no dimensional analysis functionality themselves.
* *Dimension* : A collection of zero or more base dimensions, each
- potentially raised to a different rational power. For example, area = \[L\]^2, velocity = \[L\]^1/\[T\]^1, and
+ potentially raised to a different rational power.
+ For example, length = \[L\]^1, area = \[L\]^2, velocity = \[L\]^1/\[T\]^1, and
energy = \[M\]^1 \[L\]^2/\[T\]^2 are all dimensions.
* *Base unit* : A base unit represents a specific measure of a dimension. For example, while length is an abstract measure of
distance, the meter is a concrete base unit of distance. Conversions are defined using base units.
Much like base dimensions, base units are a tag type used solely to define units and do not support dimensional
analysis algebra.
-* *Unit* : A set of base units raised to rational exponents, e.g. kg^1 m^1/s^2.
-* *System* : A unit system is a collection of base units representing all the measurable entities of interest for a
- specific problem. For example, the SI unit system defines seven base units : length (\[L\]) in meters,
- mass (\[M\]) in kilograms, time (\[T\]) in seconds, current (\[I\]) in amperes, temperature (\[theta\]) in kelvin,
- amount (\[N\]) in moles, and luminous intensity (\[J\]) in candelas. All measurable entities within the SI system can
+* *Unit* : A set of base units raised to rational exponents, e.g. m^1, kg^1, m^1/s^2.
+* *System* : A unit system is a collection of base units representing all the measurable entities of interest for a
+ specific problem. For example, the SI unit system defines seven base units : length (\[L\]) in meters,
+ mass (\[M\]) in kilograms, time (\[T\]) in seconds, current (\[I\]) in amperes, temperature (\[theta\]) in kelvin,
+ amount (\[N\]) in moles, and luminous intensity (\[J\]) in candelas. All measurable entities within the SI system can
be represented as products of various integer or rational powers of these seven base units.
-* *Quantity* : A quantity represents a concrete amount of a unit. Thus, while the meter is the base
+* *Quantity* : A quantity represents a concrete amount of a unit. Thus, while the meter is the base
unit of length in the SI system, 5.5 meters is a quantity of length in that system.
-To begin, we present two short tutorials. [@../../libs/units/tutorial/tutorial_1.cpp Tutorial1] demonstrates the use of
-[@http://en.wikipedia.org/wiki/SI_units SI] units. After including the appropriate system headers
-and the headers for the various SI units we will need (all SI units can be included with
-[headerref boost/units/systems/si.hpp]) and for quantity I/O ([headerref boost/units/io.hpp]), we define
-a function that computes the work, in joules, done by exerting a force in newtons over a specified distance in meters
-and outputs the result to `std::cout`. The [___quantity] class accepts a second template parameter as its value type;
+To begin, we present two short tutorials. [@../../libs/units/tutorial/tutorial_1.cpp Tutorial1] demonstrates the use of
+[@http://en.wikipedia.org/wiki/SI_units SI] units. After including the appropriate system headers
+and the headers for the various SI units we will need (all SI units can be included with
+[headerref boost/units/systems/si.hpp]) and for quantity I/O ([headerref boost/units/io.hpp]), we define
+a function that computes the work, in joules, done by exerting a force in newtons over a specified distance in meters
+and outputs the result to `std::cout`. The [___quantity] class accepts a second template parameter as its value type;
this parameter defaults to
`double` if not otherwise specified. To demonstrate the ease of using user-defined types in dimensional
calculations, we also present code for computing the complex impedance using `std::complex<double>`
@@ -149,70 +154,70 @@
While this library attempts to make simple dimensional computations easy to code, it is in no way
tied to any particular unit system (SI or otherwise). Instead, it provides a highly flexible compile-time
-system for dimensional analysis, supporting arbitrary collections of base dimensions, rational
-powers of units, and explicit quantity conversions. It accomplishes all of this via template metaprogramming techniques. With
-modern optimizing compilers, this results in zero runtime overhead for quantity computations relative to the
+system for dimensional analysis, supporting arbitrary collections of base dimensions, rational
+powers of units, and explicit quantity conversions. It accomplishes all of this via template metaprogramming techniques.
+With modern optimizing compilers, this results in zero runtime overhead for quantity computations relative to the
same code without unit checking.
[endsect]
[section:Dimensional_Analysis Dimensional Analysis]
-The concept of
-[@http://en.wikipedia.org/wiki/Dimensional_analysis dimensional analysis]
-is normally presented early on in introductory physics and engineering classes as a means of determining the
+The concept of
+[@http://en.wikipedia.org/wiki/Dimensional_analysis dimensional analysis]
+is normally presented early on in introductory physics and engineering classes as a means of determining the
correctness of an equation or computation by propagating the physical measurement
[@http://en.wikipedia.org/wiki/Units_of_measurement units]
-of various quantities through the equation along with their numerical values. There are a number of standard
-unit systems in common use, the most prominent of which is the
-[@http://en.wikipedia.org/wiki/SI_units Systeme International]
-(also known as SI or MKS (meter-kilogram-second), which was a metric predecessor to the SI system named
-for three of the base units on which the system is based). The SI
-is the only official international standard unit system and is widely utilized in science and engineering.
+of various quantities through the equation along with their numerical values. There are a number of standard
+unit systems in common use, the most prominent of which is the
+[@http://en.wikipedia.org/wiki/SI_units Systeme International]
+(also known as SI or MKS (meter-kilogram-second), which was a metric predecessor to the SI system named
+for three of the base units on which the system is based). The SI
+is the only official international standard unit system and is widely utilized in science and engineering.
Other common systems include the [@http://en.wikipedia.org/wiki/Cgs_units CGS]
-(centimeter-gram-second) system and the
+(centimeter-gram-second) system and the
[@http://en.wikipedia.org/wiki/English_units English]
-system still in use in some problem domains in the United States and elsewhere. In physics,
-there also exist a number of other systems that are in common use in specialized subdisciplines. These are
-collectively referred to as [@http://en.wikipedia.org/wiki/Natural_units natural units]. When
-quantities representing different measurables are combined, dimensional analysis provides the means of
-assessing the consistency of the resulting calculation. For example, the sum of two lengths is also a length,
+system still in use in some problem domains in the United States and elsewhere. In physics,
+there also exist a number of other systems that are in common use in specialized subdisciplines. These are
+collectively referred to as [@http://en.wikipedia.org/wiki/Natural_units natural units]. When
+quantities representing different measurables are combined, dimensional analysis provides the means of
+assessing the consistency of the resulting calculation. For example, the sum of two lengths is also a length,
while the product of two lengths is an area, and the sum of a length and an area is undefined. The fact that the
-arguments to many functions (such as exp, log, etc...) must be dimensionless quantities can be easily demonstrated by
-examining their series expansions in the context of dimensional analysis. This library facilitates the enforcement
+arguments to many functions (such as exp, log, etc...) must be dimensionless quantities can be easily demonstrated by
+examining their series expansions in the context of dimensional analysis. This library facilitates the enforcement
of this type of restriction in code involving dimensioned quantities where appropriate.
-In the following discussion we view dimensional analysis as an abstraction in which an arbitrary set of
-[@http://en.wikipedia.org/wiki/Fundamental_units units] obey the rules of a specific algebra.
-We will refer to a pair of a base dimension and a rational exponent as a *fundamental dimension*,
+In the following discussion we view dimensional analysis as an abstraction in which an arbitrary set of
+[@http://en.wikipedia.org/wiki/Fundamental_units units] obey the rules of a specific algebra.
+We will refer to a pair of a base dimension and a rational exponent as a *fundamental dimension*,
and a list composed of an arbitrary number of fundamental dimensions as a *composite dimension* or, simply,
*dimension*. In particular, given a set of [$../../libs/units/images/form_0.png] fundamental dimensions
denoted by [$../../libs/units/images/form_1.png] and a set of [$../../libs/units/images/form_0.png]
rational exponents [$../../libs/units/images/form_2.png], any possible (composite) dimension can be written
-as [$../../libs/units/images/form_3.png].
+as [$../../libs/units/images/form_3.png].
Composite dimensions obey the algebraic rules for dimensional analysis. In particular, for any scalar value,
-[$../../libs/units/images/form_4.png],
+[$../../libs/units/images/form_4.png],
and composite dimensions [$../../libs/units/images/form_5.png]
-and [$../../libs/units/images/form_6.png], where
+and [$../../libs/units/images/form_6.png], where
[$../../libs/units/images/form_7.png], we have:
[$../../libs/units/images/form_8.png]
-Users of a dimensional analysis library should be able to specify an arbitrary list of base dimensions to
-produce a composite dimension. This potentially includes repeated tags. For example,
-it should be possible to express energy as [$../../libs/units/images/form_9.png], [$../../libs/units/images/form_10.png],
-[$../../libs/units/images/form_11.png], or any other permutation of mass, length, and time having aggregate exponents of
+Users of a dimensional analysis library should be able to specify an arbitrary list of base dimensions to
+produce a composite dimension. This potentially includes repeated tags. For example,
+it should be possible to express energy as [$../../libs/units/images/form_9.png], [$../../libs/units/images/form_10.png],
+[$../../libs/units/images/form_11.png], or any other permutation of mass, length, and time having aggregate exponents of
1, 2, and -2, respectively.
-In order to be able to perform computations on arbitrary sets of dimensions,
-all composite dimensions must be reducible to an unambiguous final composite dimension, which we will refer to as a
+In order to be able to perform computations on arbitrary sets of dimensions,
+all composite dimensions must be reducible to an unambiguous final composite dimension, which we will refer to as a
*reduced dimension*, for which
# fundamental dimensions are consistently ordered
-# dimensions with zero exponent are elided. Note that reduced dimensions never have more than
+# dimensions with zero exponent are elided. Note that reduced dimensions never have more than
[$../../libs/units/images/form_0.png] base dimensions, one for each distinct fundamental dimension, but may have fewer.
-In our implementation, base dimensions are associated with tag types. As we will ultimately
+In our implementation, base dimensions are associated with tag types. As we will ultimately
represent composite dimensions as typelists, we must provide some mechanism for sorting
base dimension tags in order to make it possible to convert an arbitrary composite dimension
into a reduced dimension. For this purpose, we assign a unique integer to each base dimension.
@@ -228,9 +233,9 @@
[test_system_snippet_1]
It is important to note that the choice of order is completely arbitrary as long as each tag has a unique enumerable
-value; non-unique ordinals are flagged as errors at compile-time. Negative ordinals are reserved for use by the library.
+value; non-unique ordinals are flagged as errors at compile-time. Negative ordinals are reserved for use by the library.
To define composite dimensions corresponding to the base dimensions, we
-simply create MPL-conformant typelists of fundamental dimensions by using the [___dim] class to encapsulate pairs of base dimensions
+simply create MPL-conformant typelists of fundamental dimensions by using the [___dim] class to encapsulate pairs of base dimensions
and [___static_rational] exponents. The [___make_dimension_list] class acts as a wrapper to ensure
that the resulting type is in the form of a reduced dimension:
@@ -283,9 +288,9 @@
template<class Dim,class System> class unit;
In addition to supporting the compile-time dimensional analysis operations, the +, -, *, and / runtime operators are provided
-for [___unit] variables. Because the dimension associated with powers and roots must be computed at compile-time, it is not
-possible to provide overloads for `std::pow` that function correctly for [___unit]s. These operations are supported through
-free functions [___pow] and [___root] that are templated on integer and [___static_rational] values and can take as an argument
+for [___unit] variables. Because the dimension associated with powers and roots must be computed at compile-time, it is not
+possible to provide overloads for `std::pow` that function correctly for [___unit]s. These operations are supported through
+free functions [___pow] and [___root] that are templated on integer and [___static_rational] values and can take as an argument
any type for which the utility classes [___power_typeof_helper] and [___root_typeof_helper] have been defined.
[section Base Units]
@@ -296,30 +301,30 @@
Again negative ordinals are reserved.
-As an example, in the following we will implement a subset of the SI unit system based on the fundamental dimensions
+As an example, in the following we will implement a subset of the SI unit system based on the fundamental dimensions
given above, demonstrating all steps necessary for a completely functional system. First, we simply define a unit system
that includes type definitions for commonly used units:
[test_system_snippet_6]
-The macro [___BOOST_UNITS_STATIC_CONSTANT] is provided in [headerref boost/units/static_constant.hpp]
-to facilitate ODR- and thread-safe constant definition in header files. We then define some constants for the supported units
+The macro [___BOOST_UNITS_STATIC_CONSTANT] is provided in [headerref boost/units/static_constant.hpp]
+to facilitate ODR- and thread-safe constant definition in header files. We then define some constants for the supported units
to simplify variable definitions:
[test_system_snippet_7]
-If support for textual output of units is desired, we can also specialize the [___base_unit_info] class for each fundamental
+If support for textual output of units is desired, we can also specialize the [___base_unit_info] class for each fundamental
dimension tag:
[test_system_snippet_8]
and similarly for `kilogram_base_unit` and `second_base_unit`. A future version of the library will provide a more flexible system
-allowing for internationalization through a facet/locale-type mechanism.
-The `name()` and `symbol()` methods of [___base_unit_info] provide full and short names for the base unit. With these definitions,
-we have the rudimentary beginnings of our unit system, which can be used to determine reduced dimensions for arbitrary
+allowing for internationalization through a facet/locale-type mechanism.
+The `name()` and `symbol()` methods of [___base_unit_info] provide full and short names for the base unit. With these definitions,
+we have the rudimentary beginnings of our unit system, which can be used to determine reduced dimensions for arbitrary
unit calculations.
-[endsect]
+[endsect] [/section Base Units]
[section Scaled Base Units]
@@ -340,7 +345,7 @@
* Similarly, if the symbol for grams is defined as "g", then the symbol for kilograms
will be "kg" without any extra effort.
-[endsect]
+[endsect] [/section Scaled Base Units]
[section Scaled Units]
@@ -353,20 +358,73 @@
typedef make_scaled_unit<si::time, scale<10, static_rational<-9> > >::type nanosecond;
-nanosecond is a specialization of [___unit], and can be
-used in a quantity normally.
+nanosecond is a specialization of [___unit], and can be used in a quantity normally.
quantity<nanosecond> t(1.0 * si::seconds);
std::cout << t << std::endl; // prints 1e9 ns
-[endsect]
+[endsect] [/section Scaled Units]
-[endsect]
+[section:autoscale Automatically Scaled Units]
+
+It is often desirable to scale a [___unit] automatically, depending on its value,
+to keep the integral part in a limited range, usually between 1 and 999.
+
+For example, using [@http://en.wikipedia.org/wiki/Engineering_notation engineering notation prefixes],
+
+ "1234.5 m" is more helpfully displayed as "1.234 km"
+ "0.000000001234 m" is more clearly displayed as "1.2345 nanometer".
+
+The iostream manipulators `engineering_prefixes` or `binary_prefixes` make this easy.
+
+[import ../example/autoprefixes.cpp]
+
+[autoprefixes_snippet_1]
+
+(The complete set of [@http://physics.nist.gov/cuu/Units/prefixes.html engineering and scientific multiples]
+is not used (not centi or deci for example), but only powers of ten that are multiples of three, 10^3).
+
+Similarly, the equivalent [@http://en.wikipedia.org/wiki/Binary_prefixes binary prefixes]
+used for displaying computing kilobytes, megabytes, gigabytes...
+
+These are the 2^10 = 1024, 2^20 = 1 048 576, 2^30 ... multiples.
+
+(See also [@http://physics.nist.gov/cuu/Units/binary.html Prefixes for binary multiples]
+
+This scale is specified in IEC 60027-2, Second edition, 2000-11,
+Letter symbols to be used in electrical technology -
+Part 2: Telecommunications and electronics).
+
+[autoprefixes_snippet_2]
+
+But note that scalar dimensionless values, like int, float and double,
+are *not* prefixed automatically by the engineering_prefix or binary_prefix iostream manipulators.
+
+[autoprefixes_snippet_3]
+
+You can output the name or symbol of a unit (rather than the most common quantity of a unit).
+
+[autoprefixes_snippet_4]
+
+Note too that all the formatting flags are persistent,
+so that if you set engineering_prefix, then it applies to all future outputs,
+until you select binary_prefix, or explicitly switch autoprefix off.
+You can specify no prefix (the default of course) in two ways:
+
+[autoprefixes_snippet_5]
+
+And you can get the format flags for diagnosing problems.
+
+[autoprefixes_snippet_6]
+
+[endsect] [/section:autoscale Automatically Scaled Units]
+
+[endsect] [/section:Units Units]
[section:Quantities Quantities]
A *quantity* is defined as a value of an arbitrary value type that is associated with a specific unit. For example,
-while meter is a unit, 3.0 meters is a quantity. Quantities obey two separate algebras: the native algebra for their
+while meter is a unit, 3.0 meters is a quantity. Quantities obey two separate algebras: the native algebra for their
value type, and the dimensional analysis algebra for the associated unit. In addition, algebraic operations are defined
between units and quantities to simplify the definition of quantities; it is effectively equivalent to algebra with
a unit-valued quantity.
@@ -377,19 +435,19 @@
This class is templated on both unit type (`Unit`) and value type (`Y`), with the latter defaulting to double-precision
floating point if not otherwise specified. The value type must have a normal copy constructor and copy
-assignment operator. Operators +, -, *, and / are provided for algebraic operations between
+assignment operator. Operators +, -, *, and / are provided for algebraic operations between
scalars and units, scalars and quantities, units and quantities, and between quantities. In addition, integral and
-rational powers and roots can be computed using the [___pow]<R> and [___root]<R> functions. Finally,
-the standard set of boolean comparison operators ( `==, !=, <, <=, >, and >=` ) are provided to allow
+rational powers and roots can be computed using the [___pow]<R> and [___root]<R> functions. Finally,
+the standard set of boolean comparison operators ( `==, !=, <, <=, >, and >=` ) are provided to allow
comparison of quantities from the same unit system. All operators simply delegate to the
corresponding operator of the value type if the units permit.
[section:Heterogeneous_Operators Heterogeneous Operators]
-For most common value types, the result type of arithmetic operators is the same as the value type itself. For example,
-the sum of two double precision floating point numbers is another double precision floating point number. However, there
-are instances where this is not the case. A simple example is given by the [@http://en.wikipedia.org/wiki/Natural_number
-natural numbers] where the operator arithmetic obeys the following rules (using the standard notation for
+For most common value types, the result type of arithmetic operators is the same as the value type itself. For example,
+the sum of two double precision floating point numbers is another double precision floating point number. However, there
+are instances where this is not the case. A simple example is given by the [@http://en.wikipedia.org/wiki/Natural_number
+natural numbers] where the operator arithmetic obeys the following rules (using the standard notation for
[@http://en.wikipedia.org/wiki/Number number systems]):
* [$../../libs/units/images/form_12.png]
@@ -397,7 +455,7 @@
* [$../../libs/units/images/form_14.png]
* [$../../libs/units/images/form_15.png]
-This library is designed to support arbitrary value type algebra for addition, subtraction, multiplication, division, and
+This library is designed to support arbitrary value type algebra for addition, subtraction, multiplication, division, and
rational powers and roots. It uses Boost.Typeof to deduce the result of these operators. For compilers that
support `typeof`, the appropriate value type will be automatically deduced. For compilers that do not provide
language support for `typeof` it is necessary to register all the types used. For the case of natural numbers,
@@ -411,11 +469,11 @@
[section:Conversions Conversions]
-Conversion is only meaningful for quantities as it implies the presence of at
+Conversion is only meaningful for quantities as it implies the presence of at
least a multiplicative scale factor and, possibly, and affine linear offset.
Macros for simplifying the definition of conversions between units can be found in
[headerref boost/units/conversion.hpp] and [headerref boost/units/absolute.hpp]
-(for affine conversions with offsets).
+(for affine conversions with offsets).
The macro [___BOOST_UNITS_DEFINE_CONVERSION_FACTOR] specifies a scale
factor for conversion from the first unit type to the second. The
@@ -456,8 +514,8 @@
This library is designed to emphasize safety above convenience when performing operations with dimensioned quantities.
Specifically, construction of quantities is required to fully specify both value and unit. Direct construction from a scalar value
-is prohibited (though the static member function [___from_value] is provided to enable
-this functionality where it is necessary. In addition, a [___quantity_cast] to a reference allows direct access to the
+is prohibited (though the static member function [___from_value] is provided to enable
+this functionality where it is necessary. In addition, a [___quantity_cast] to a reference allows direct access to the
underlying value of a [___quantity] variable. An explicit constructor is provided to enable conversion between
dimensionally compatible quantities in different unit systems. Implicit conversions between unit systems are
allowed only when the reduced units are identical, allowing, for example, trivial conversions between
@@ -465,7 +523,7 @@
unintentional unit system mismatches to be caught at compile time and preventing potential loss of precision and
performance overhead from unintended conversions. Assignment follows the same rules.
An exception is made for quantities for which the unit reduces to dimensionless; in this case, implicit conversion
-to the underlying value type is allowed via class template specialization. Quantities of different value types are implicitly
+to the underlying value type is allowed via class template specialization. Quantities of different value types are implicitly
convertible only if the value types are themselves implicitly convertible. The [___quantity] class also defines
a `value()` member for directly accessing the underlying value.
@@ -475,17 +533,17 @@
* assignment between `quantity<Unit,Y>` and `quantity<Unit,Z>` is allowed if `Y` and `Z` are implicitly convertible.
* explicit conversion between `quantity<Unit1,Y>` and `quantity<Unit2,Z>` is allowed if `Unit1` and `Unit2` have the same dimensions
and if `Y` and `Z` are implicitly convertible.
-* implicit conversion between `quantity<Unit1,Y>` and `quantity<Unit2,Z>` is allowed if `Unit1`
+* implicit conversion between `quantity<Unit1,Y>` and `quantity<Unit2,Z>` is allowed if `Unit1`
reduces to exactly the same combination of base units as `Unit2` and if `Y` and `Z` are convertible.
* assignment between `quantity<Unit1,Y>` and `quantity<Unit2,Z>` is allowed under the same
conditions as implicit conversion.
-* `quantity<Unit,Y>` can be directly constructed from a value of type `Y` using the static member function [___from_value]. Doing so,
+* `quantity<Unit,Y>` can be directly constructed from a value of type `Y` using the static member function [___from_value]. Doing so,
naturally, bypasses any type-checking of the newly assigned value, so this method should be used only when absolutely necessary.
Of course, any time implicit conversion is allowed, an explicit conversion is
also legal.
-Because dimensionless quantities have no associated units, they behave as normal scalars, and allow implicit conversion to and from
+Because dimensionless quantities have no associated units, they behave as normal scalars, and allow implicit conversion to and from
the underlying value type or types that are convertible to/from that value type.
[endsect]
@@ -507,7 +565,10 @@
[dimension_snippet_1]
-outputting (with symbol demangling, implemented in [headerref boost/units/detail/utility.hpp])
+outputting (with symbol demangling, implemented in
+[@boost:/boost/units/detail/utility.hpp utility.hpp])
+
+[/ was [headerref boost/units/detail/utility.hpp] but this file is not included in Doxygen input.]
[dimension_output]
@@ -515,10 +576,12 @@
[section:UnitExample Unit Example]
-([@../../libs/units/example/unit.cpp unit.cpp])
+([@../../example/unit.cpp unit.cpp])
-This example demonstrates the use of the simple but functional unit system implemented in
-[headerref libs/units/example/test_system.hpp] :
+This example demonstrates the use of the simple but functional unit system implemented in
+[@http://www.boost.org/doc/libs/1_42_0/libs/units/example/test_system.hpp test_system.hpp]
+
+[/ was [headerref libs/units/example/test_system.hpp] but this file is not included in Doxygen input.]
[import ../example/unit.cpp]
@@ -544,13 +607,13 @@
[quantity_output_double]
-As a further demonstration of the flexibility of the system, we replace the `double` value type
+As a further demonstration of the flexibility of the system, we replace the `double` value type
with a `std::complex<double>` value type (ignoring the question of the meaningfulness of
complex lengths and energies) :
[quantity_snippet_2]
-and find that the code functions exactly as expected with no additional work, delegating operations
+and find that the code functions exactly as expected with no additional work, delegating operations
to `std::complex<double>` and performing the appropriate dimensional analysis :
[quantity_output_complex]
@@ -559,7 +622,7 @@
[section:KitchenSinkExample Kitchen Sink Example]
-([@../../libs/units/example/kitchen_sink.cpp kitchen_sink.cpp])
+([@../../example/kitchen_sink.cpp kitchen_sink.cpp])
This example provides a fairly extensive set of tests covering most of the [___quantity] functionality.
It uses the SI unit system defined in [headerref boost/units/systems/si.hpp].
@@ -570,7 +633,7 @@
[kitchen_sink_snippet_1]
-the various algebraic operations between scalars, units, and quantities give
+the various algebraic operations between scalars, units, and quantities give
[kitchen_sink_output_1]
@@ -628,7 +691,7 @@
[kitchen_sink_output_10]
Trigonometric and inverse trigonometric functions can be implemented for any unit system
-that provides an angular base dimension. For radians, these functions are found in
+that provides an angular base dimension. For radians, these functions are found in
[headerref boost/units/cmath.hpp] These behave as one expects, with trigonometric functions
taking an angular quantity and returning a dimensionless quantity, while the inverse trigonometric functions
take a dimensionless quantity and return an angular quantity :
@@ -653,7 +716,7 @@
User-defined value types that support the appropriate arithmetic operations are automatically supported
as quantity value types. The operators that are supported by default for quantity value types are unary plus, unary minus,
-addition, subtraction, multiplication, division, equal-to, not-equal-to, less-than, less-or-equal-to,
+addition, subtraction, multiplication, division, equal-to, not-equal-to, less-than, less-or-equal-to,
greater-than, and greater-or-equal-to. Support for rational powers and roots can be added by overloading
the [___power_typeof_helper] and [___root_typeof_helper] classes. Here we implement a user-defined `measurement`
class that models a numerical measurement with an associated measurement error and the appropriate algebra and
@@ -687,7 +750,7 @@
[conversion_snippet_1]
-illustrates implicit conversion of quantities of different value types where implicit conversion
+illustrates implicit conversion of quantities of different value types where implicit conversion
of the value types themselves is allowed. N.B. The conversion from double to int is treated
as an explicit conversion because there is no way to emulate the exact behavior of the built-in
conversion. Explicit constructors allow conversions for two cases:
@@ -719,7 +782,7 @@
([@../../libs/units/example/quaternion.cpp quaternion.cpp])
This example demonstrates the use of `boost::math::quaternion` as a value type for [___quantity] and the converse.
-For the first case, we first define specializations of [___power_typeof_helper] and [___root_typeof_helper] for
+For the first case, we first define specializations of [___power_typeof_helper] and [___root_typeof_helper] for
powers and roots, respectively:
[import ../example/quaternion.cpp]
@@ -734,7 +797,7 @@
so that all operations that are defined in the `quaternion` class behave correctly. If rational
powers were defined for this class, it would be possible to compute rational powers and roots with
-no additional changes.
+no additional changes.
[quaternion_output_1]
@@ -742,11 +805,11 @@
[quaternion_snippet_2]
-Here, the unary plus and minus and addition and subtraction operators function correctly. Unfortunately,
-the multiplication and division operations fail because `quaternion` implements them in terms of the `*=` and
-`/=` operators, respectively, which are incapable of representing the heterogeneous unit algebra needed for
-quantities (an identical problem
-occurs with `std::complex<T>`, for the same reason). In order to compute rational powers and roots, we need to
+Here, the unary plus and minus and addition and subtraction operators function correctly. Unfortunately,
+the multiplication and division operations fail because `quaternion` implements them in terms of the `*=` and
+`/=` operators, respectively, which are incapable of representing the heterogeneous unit algebra needed for
+quantities (an identical problem
+occurs with `std::complex<T>`, for the same reason). In order to compute rational powers and roots, we need to
specialize [___power_typeof_helper] and [___root_typeof_helper] as follows:
[quaternion_class_snippet_2a]
@@ -763,11 +826,11 @@
([@../../libs/units/example/complex.cpp complex.cpp])
-This example demonstrates how to implement a replacement `complex` class that functions correctly both as a
-quantity value type and as a quantity container class, including heterogeneous multiplication and division
+This example demonstrates how to implement a replacement `complex` class that functions correctly both as a
+quantity value type and as a quantity container class, including heterogeneous multiplication and division
operations and rational powers and roots. Naturally, heterogeneous operations are only supported on
compilers that implement `typeof`. The primary differences are that binary operations are not implemented
-using the `op=` operators and use the utility classes [___add_typeof_helper], [___subtract_typeof_helper],
+using the `op=` operators and use the utility classes [___add_typeof_helper], [___subtract_typeof_helper],
[___multiply_typeof_helper], and [___divide_typeof_helper]. In addition, [___power_typeof_helper] and
[___root_typeof_helper] are defined for both cases :
@@ -777,13 +840,13 @@
With this replacement `complex` class, we can declare a complex variable :
-[complex_snippet_1]
+[complex_snippet_1]
to get the correct behavior for all cases supported by [___quantity] with a `complex` value type :
[complex_output_1]
-and, similarly, `complex` with a [___quantity] value type
+and, similarly, `complex` with a [___quantity] value type
[complex_snippet_2]
@@ -797,9 +860,9 @@
([@../../libs/units/example/performance.cpp performance.cpp])
-This example provides an ad hoc performance test to verify that zero runtime overhead
-is incurred when using [___quantity] in place of `double`. Note that performance
-optimization and testing is not trivial, so some care must be taken in profiling. It
+This example provides an ad hoc performance test to verify that zero runtime overhead
+is incurred when using [___quantity] in place of `double`. Note that performance
+optimization and testing is not trivial, so some care must be taken in profiling. It
is also critical to have a compiler capable of optimizing the many template instantiations
and inline calls effectively to achieve maximal performance. Zero overhead for this test
has been verified using gcc 4.0.1, and icc 9.0, 10.0, and 10.1 on Mac OS 10.4 and 10.5, and
@@ -813,7 +876,7 @@
[import ../example/radar_beam_height.cpp]
-This example demonstrates the implementation of two non-SI units of length, the
+This example demonstrates the implementation of two non-SI units of length, the
nautical mile :
[radar_beam_height_class_snippet_1]
@@ -823,8 +886,8 @@
[radar_beam_height_class_snippet_2]
These units include conversions between themselves and the meter. Three functions
-for computing radar beam height from radar range and the local earth radius are
-defined. The first takes arguments in one system and returns a value in the same
+for computing radar beam height from radar range and the local earth radius are
+defined. The first takes arguments in one system and returns a value in the same
system :
[radar_beam_height_function_snippet_1]
@@ -835,7 +898,7 @@
[radar_beam_height_function_snippet_2]
Finally, the third function is an empirical approximation that is only valid for
-radar ranges specified in nautical miles, returning beam height in feet. This
+radar ranges specified in nautical miles, returning beam height in feet. This
function uses the heterogeneous unit of nautical miles per square root of feet to
ensure dimensional correctness :
@@ -883,10 +946,10 @@
[import ../example/temperature.cpp]
-This example demonstrates using of absolute temperatures and relative temperature differences in Fahrenheit
+This example demonstrates using of absolute temperatures and relative temperature differences in Fahrenheit
and converting between these and the Kelvin temperature scale. This issue touches on some surprisingly deep mathematical
concepts (see [@http://en.wikipedia.org/wiki/Affine_space Wikipedia] for a basic review), but for our purposes here, we
-will simply observe that it is important to be able to differentiate between an absolute temperature measurement and a
+will simply observe that it is important to be able to differentiate between an absolute temperature measurement and a
measurement of temperature difference. This is accomplished by using the [___absolute] wrapper class.
First we define a system using the predefined fahrenheit base unit:
@@ -935,23 +998,23 @@
[import ../example/composite_output.cpp]
If a unit has a special name and/or symbol, the free functions `name_string` and
-`symbol_string` can be overloaded directly.
+`symbol_string` can be overloaded directly.
[composite_output_snippet_1]
-In this case, any unit that reduces
-to the overloaded unit will be output with the replacement symbol.
+In this case, any unit that reduces
+to the overloaded unit will be output with the replacement symbol.
-Special names and symbols for the SI and CGS unit systems are found in
-[headerref boost/units/systems/si/io.hpp] and [headerref boost/units/systems/cgs/io.hpp],
+Special names and symbols for the SI and CGS unit systems are found in
+[headerref boost/units/systems/si/io.hpp] and [headerref boost/units/systems/cgs/io.hpp],
respectively. If these headers are not included, the output will simply follow
-default rules using the appropriate fundamental dimensions.
-Note that neither of these functions is defined for quantities
+default rules using the appropriate fundamental dimensions.
+Note that neither of these functions is defined for quantities
because doing so would require making assumptions on how the corresponding value
type should be formatted.
Three `ostream` formatters, `symbol_format`, `name_format`, and `typename_format`
-are provided for convenience. These select the textual representation of units
+are provided for convenience. These select the textual representation of units
provided by `symbol_string` or `name_string` in the first two cases, while the
latter returns a demangled typename for debugging purposes. Formatting of scaled
unit is also done correctly.
@@ -1008,7 +1071,7 @@
[section:Utilities Utilities]
Relatively complete SI and CGS unit systems are provided in [headerref boost/units/systems/si.hpp] and
-[headerref boost/units/systems/cgs.hpp], respectively.
+[headerref boost/units/systems/cgs.hpp], respectively.
[section:Metaprogramming_Classes Metaprogramming Classes]
@@ -1061,7 +1124,7 @@
template<class System> struct is_dimensionless< unit<dimensionless_type,System> >;
template<class System> struct is_dimensionless_unit< unit<dimensionless_type,System> >;
template<class System,class Y> struct is_dimensionless< quantity<unit<dimensionless_type,System>,Y> >;
- template<class System,class Y> struct is_dimensionless_quantity< quantity<unit<dimensionless_type,System>,Y> >;
+ template<class System,class Y> struct is_dimensionless_quantity< quantity<unit<dimensionless_type,System>,Y> >;
[endsect]
@@ -1099,9 +1162,9 @@
[section:Installation Installation]
-The core header files are located in `boost/units`. Unit system headers are
+The core header files are located in `boost/units`. Unit system headers are
located in `<boost/units/systems>`. There are no source files for the library
-itself - the library is header-only. Example programs demonstrating various aspects of the library can be found in
+itself - the library is header-only. Example programs demonstrating various aspects of the library can be found in
`boost/libs/units/example`. Programs for unit testing are provided in `boost/libs/units/test`.
[endsect]
@@ -1109,24 +1172,24 @@
[section:FAQ FAQ]
[section:Distinguishing_Quantities_With_Same_Units
-How does one distinguish between quantities that are physically different but have the same units (such as
+How does one distinguish between quantities that are physically different but have the same units (such as
energy and torque)?]
-Because Boost.Units includes plane and solid angle units in the SI system, torque and energy
-are, in fact, distinguishable (see [@http://en.wikipedia.org/wiki/SI_units torque]).
+Because Boost.Units includes plane and solid angle units in the SI system, torque and energy
+are, in fact, distinguishable (see [@http://en.wikipedia.org/wiki/SI_units torque]).
In addition, energy is a true
[@http://mathworld.wolfram.com/Scalar.html scalar] quantity, while torque, despite
-having the same units as energy if plane angle is not included, is in fact a
-[@http://mathworld.wolfram.com/Pseudovector.html pseudovector]. Thus, a value type representing pseudovectors
-and encapsulating their algebra could also be implemented.
+having the same units as energy if plane angle is not included, is in fact a
+[@http://mathworld.wolfram.com/Pseudovector.html pseudovector]. Thus, a value type representing pseudovectors
+and encapsulating their algebra could also be implemented.
There are,
however, a few SI units that are dimensionally indistinguishable within the SI system. These
include the [@http://en.wikipedia.org/wiki/Becquerel becquerel], which has units identical to
frequency (Hz), and the [@http://en.wikipedia.org/wiki/Sievert sievert], which is degenerate
-with the [@http://en.wikipedia.org/wiki/Gray_%28unit%29 gray]. In cases such as this,
+with the [@http://en.wikipedia.org/wiki/Gray_%28unit%29 gray]. In cases such as this,
the proper way to treat this difference is to recognize that expanding the set of base dimensions
-can provide disambiguation. For example, adding a base dimension for radioactive decays would
+can provide disambiguation. For example, adding a base dimension for radioactive decays would
allow the becquerel to be written as decays/second, differentiating it from the signature of hertz,
which is simply 1/second.
@@ -1134,8 +1197,8 @@
[section:Angle_Are_Units Angles are treated as units]
-If you don't like this, you can just ignore the angle units and
-go on your merry way (periodically screwing up when a routine wants degrees and you give it
+If you don't like this, you can just ignore the angle units and
+go on your merry way (periodically screwing up when a routine wants degrees and you give it
radians instead...)
[endsect]
@@ -1162,35 +1225,35 @@
is zero, which should be handled by the default constructor. In addition,
consider the search and replace problem allowing this poses:
- quantity<si::length> q(1.0);
-
+ quantity<si::length> q(1.0);
+
Here, the intent is clear - we want a length of one in the SI system, which is one meter. However,
imagine some well-intentioned coder attempting to reuse this code, but to have it perform the
calculations in the CGS unit system instead. After searching for `si::` and replacing it with `cgs::` ,
we have:
- quantity<cgs::length> q(1.0);
-
+ quantity<cgs::length> q(1.0);
+
Unfortunately, the meaning of this statement has suddenly changed from one meter to one centimeter. In
contrast, as implemented, we begin with:
- quantity<si::length> q(1.0*si::meter);
-
+ quantity<si::length> q(1.0*si::meter);
+
and, after search and replace:
- quantity<cgs::length> q(1.0*cgs::meter);
-
+ quantity<cgs::length> q(1.0*cgs::meter);
+
which gives us an error. Even if the code has a @using namespace boost::units::si; declaration, the latter
is still safe, with:
- using namespace boost::units::si;
- quantity<length> q(1.0*meter);
-
+ using namespace boost::units::si;
+ quantity<length> q(1.0*meter);
+
going to
- using namespace boost::units::cgs;
- quantity<length> q(1.0*meter);
-
+ using namespace boost::units::cgs;
+ quantity<length> q(1.0*meter);
+
The latter will involve an explicit conversion from meters to centimeters, but the value remains correct.
[endsect]
@@ -1206,7 +1269,7 @@
[section:Acknowledgements Acknowledgements]
-Matthias C. Schabel would like to acknowledge the Department of Defense for its support of this work under
+Matthias C. Schabel would like to acknowledge the Department of Defense for its support of this work under
the Prostate Cancer Research Program New Investigator Award W81XWH-04-1-0042 and the National Institutes of Health for their
support of this work under the NIBIB Mentored Quantitative Research Development Award K25EB005077.
@@ -1215,25 +1278,25 @@
Thanks to:
-* Paul Bristow,
-* Michael Fawcett,
-* Ben FrantzDale,
+* Paul Bristow,
+* Michael Fawcett,
+* Ben FrantzDale,
* Ron Garcia,
* David Greene,
* Peder Holt,
-* Janek Kozicki,
+* Janek Kozicki,
* Andy Little,
* Kevin Lynch,
* Torsten Maehne
* Noah Roberts,
* Andrey Semashev,
* David Walthall,
-* Deane Yang,
+* Deane Yang,
-and all the members of the Boost mailing list who provided their input into
+and all the members of the Boost mailing list who provided their input into
the design and implementation of this library.
-[endsect]
+[endsect] [/section:Acknowledgements Acknowledgements]
[section:HelpWanted Help Wanted]
@@ -1241,53 +1304,70 @@
* testing on other compilers and operating systems
* performance testing on various architectures
-* tutorials
+* tutorials
[endsect]
+[section:version_id Version Info]
+
+__boostroot
+
+Last edit to Quickbook file __FILENAME__ was at __TIME__ on __DATE__.
+
+[tip This should appear on the pdf version (but may be redundant on html).]
+[/ Useful on pdf version. See also Last revised timestamp on first page of html version.]
+[/See also Adobe Reader pdf File Properties for creation date, and PDF producer, version and page count.]
+
+[endsect] [/section:version_id Version Info]
+
[section:ReleaseNotes Release Notes]
+1.2 (March 2010)
+
+* Added autoprefix ready for Boost 1.43
+
1.0.0 (August 1, 2008) :
* Initial release with Boost 1.36
0.7.1 (March 14, 2007) :
-* Boost.Typeof emulation support
+* Boost.Typeof emulation support.
* attempting to rebind a heterogeneous_system to a different set of dimensions now fails.
-* cmath.hpp now works with como-win32
-* minor changes to the tests and examples to make msvc 7.1 happy
+* cmath.hpp now works with como-win32.
+* minor changes to the tests and examples to make msvc 7.1 happy.
0.7.0 (March 13, 2007) :
-* heterogeneous and mixed system functionality added
-* added fine-grained implicit unit conversion on a per fundamental dimension basis
-* added a number of utility metafunction classes and predicates
-* [headerref boost/units/operators.hpp] now uses `BOOST_TYPEOF` when possible
-* angular units added in [headerref boost/units/systems/trig.hpp] - implicit conversion
- of radians between trigonometric, SI, and CGS systems allowed
-* a variety of [___unit] and [___quantity] tests added
-* examples now provide self-tests
+* heterogeneous and mixed system functionality added.
+* added fine-grained implicit unit conversion on a per fundamental dimension basis.
+* added a number of utility metafunction classes and predicates.
+* [headerref boost/units/operators.hpp] now uses `BOOST_TYPEOF` when possible.
+* angular units added in [headerref boost/units/systems/angle/gradians.hpp]
+ and [headerref boost/units/systems/angle/gradians.hpp].
+ Implicit conversion of radians between trigonometric, SI, and CGS systems is allowed.
+* a variety of [___unit] and [___quantity] tests added.
+* examples now provide self-tests.
0.6.2 (February 22, 2007) :
* changed template order in `unit` so dimension precedes unit system
* added `homogeneous_system<S>` for unit systems
-* incorporated changes to [headerref boost/units/dimension.hpp] (compile-time sorting by predicate),
- [headerref boost/units/conversion.hpp] (thread-safe implementation of quantity conversions),
+* incorporated changes to [headerref boost/units/dimension.hpp] (compile-time sorting by predicate),
+ [headerref boost/units/conversion.hpp] (thread-safe implementation of quantity conversions),
and [headerref boost/units/io.hpp] (now works with any `std::basic_ostream`) by SW
* added abstract units in [headerref boost/units/systems/abstract.hpp] to allow abstract dimensional
analysis
-* new example demonstrating implementation of code based on requirements from
+* new example demonstrating implementation of code based on requirements from
Michael Fawcett ([@../../libs/units/example/radar_beam_height.cpp radar_beam_height.cpp])
0.6.1 (February 13, 2007) :
-* added metafunctions to test if a type is
+* added metafunctions to test if a type is
* a valid dimension list (`is_dimension_list<D>`)
* a unit (`is_unit<T>` and `is_unit_of_system<U,System>`)
- * a quantity (`is_quantity<T>` and `is_quantity_of_system<Q,System>`)
-* quantity conversion factor is now computed at compile time
+ * a quantity (`is_quantity<T>` and `is_quantity_of_system<Q,System>`)
+* quantity conversion factor is now computed at compile time
* static constants now avoid ODR problems
* unit_example_14.cpp now uses Boost.Timer
* numerous minor fixes suggested by SW
@@ -1299,12 +1379,12 @@
0.5.8 (February 7, 2007) :
-* fixed `#include` in [headerref boost/units/systems/si/base.hpp] (thanks to Michael Fawcett and
+* fixed `#include` in [headerref boost/units/systems/si/base.hpp] (thanks to Michael Fawcett and
Steven Watanabe)
* removed references to obsolete `base_type` in [___unit_info] (thanks to Michael Fawcett)
-* moved functions in [headerref boost/units/cmath.hpp] into `boost::units` namespace
+* moved functions in [headerref boost/units/cmath.hpp] into `boost::units` namespace
(thanks to Steven Watanabe)
-* fixed `#include` guards to be consistently named `BOOST_UNITS_XXX` (thanks to Steven
+* fixed `#include` guards to be consistently named `BOOST_UNITS_XXX` (thanks to Steven
Watanabe)
0.5.7 (February 5, 2007) :
@@ -1319,7 +1399,7 @@
`scale` and `scaled_value` classes (thanks to Kevin Lynch)
* split SI units into separate header files to minimize the "kitchen sink" include problem
(thanks to Janek Kozicki)
-* added convenience classes for declaring fundamental dimensions and composite dimensions
+* added convenience classes for declaring fundamental dimensions and composite dimensions
with integral powers (`fundamental_dimension` and `composite_dimension` respectively)
0.5.5 (January 18, 2007) :
@@ -1330,7 +1410,7 @@
* added `quantity_cast` for three cases (thanks to Andrey Semashev):
* constructing `quantity` from raw `value_type`
* casting from one `value_type` to another
- * casting from one `unit` to another (where conversion is allowed)
+ * casting from one `unit` to another (where conversion is allowed)
* added` metre` and `metres` and related constants to the SI system for the convenience of
our Commonwealth friends...
@@ -1338,7 +1418,7 @@
* completely reimplemented unit conversion to allow for arbitrary unit conversions
between systems
-* strict quantity construction is default; quantities can be constructed from bare values
+* strict quantity construction is default; quantities can be constructed from bare values
by using static member `from_value`
0.5.3 (December 12, 2006) :
@@ -1350,7 +1430,7 @@
0.5.2 (December 4, 2006) :
-* added `<cmath>` wrappers in the `std` namespace for functions that can support quantities
+* added `<cmath>` wrappers in the `std` namespace for functions that can support quantities
0.5.1 (November 3, 2006) :
@@ -1368,13 +1448,13 @@
and `quantity<complex<Y>,Unit>` as an example
* investigate using Boost.Typeof for compilers that do not support `typeof`
-0.4 (October 13, 2006) :
+0.4 (October 13, 2006) :
* `pow<R>` and `root<R>` improved for user-defined types
* added unary + and unary - operators
* added new example of interfacing with `boost::math::quaternion`
* added optional preprocessor switch to enable implicit unit conversions
- (`BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSIONS`)
+ (`BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSIONS`)
0.3 (September 6, 2006) :
@@ -1395,4 +1475,4 @@
* Implementation of I/O is rudimentary; consider methods of i18n using facets
* Consider runtime variant, perhaps using overload like `quantity<runtime,Y>`
-[endsect]
+[endsect] [/section:TODO TODO]
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