Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 76 additions & 76 deletions doc/units.qbk

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/autoprefixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main()

quantity<energy> e = kilograms * pow<2>(l / seconds); // A quantity of energy.
cout << engineering_prefix << e << endl; // 5.49902 MJ
cout << name_format << engineering_prefix << e << endl; // 5.49902 megaJoule
cout << name_format << engineering_prefix << e << endl; // 5.49902 megajoule
//] [/autoprefixes_snippet_1]

//[autoprefixes_snippet_2
Expand All @@ -118,7 +118,7 @@ int main()
const length L; // A unit of length (but not a quantity of length).
cout << L << endl; // Default length unit is meter,
// but default is symbol format so output is just "m".
cout << name_format << L << endl; // default length name is "meter".
cout << name_format << L << endl; // Default length name is "meter".
//] [/autoprefixes_snippet_4]

//[autoprefixes_snippet_5
Expand Down
2 changes: 1 addition & 1 deletion example/kitchen_sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ int main()
<< std::endl;

//[kitchen_sink_snippet_4
/// test calcuation of work
/// test calculation of work
quantity<force> F(1.0*newton);
quantity<length> dx(1.0*meter);
quantity<energy> E(work(F,dx));
Expand Down
4 changes: 2 additions & 2 deletions example/lambda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
// Include boost/units/lambda.hpp instead of boost/lambda/lambda.hpp
// for a convenient usage of Boost.Units' quantity, unit, and absolute
// types in lambda expressions. The header augments Boost.Lambda's
// return type detuction system to recognize the new types so that not
// return type deduction system to recognize the new types so that not
// for each arithmetic operation the return type needs to be
// explicitely specified.
// explicitly specified.
#include <boost/units/lambda.hpp>

#include <boost/lambda/bind.hpp>
Expand Down
4 changes: 2 additions & 2 deletions example/tutorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ work(const quantity<force>& F, const quantity<length>& dx)
int main()
{
/// Test calculation of work.
quantity<force> F(2.0 * newton); // Define a quantity of force.
quantity<force> F(2.0 * newton); // Define a quantity of force,
quantity<length> dx(2.0 * meter); // and a distance,
quantity<energy> E(work(F,dx)); // and calculate the work done.

Expand All @@ -75,7 +75,7 @@ int main()
<< std::endl;

/// Test and check complex quantities.
typedef std::complex<double> complex_type; // double real and imaginary parts.
typedef std::complex<double> complex_type; // double real and imaginary parts

// Define some complex electrical quantities.
quantity<electric_potential, complex_type> v = complex_type(12.5, 0.0) * volts;
Expand Down
2 changes: 1 addition & 1 deletion include/boost/units/absolute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace boost {
namespace units {

/// Macro to define the offset between two absolute units.
/// Requires the value to be in the destination units e.g
/// Requires the value to be in the destination units, e.g.,
/// @code
/// BOOST_UNITS_DEFINE_CONVERSION_OFFSET(celsius_base_unit, fahrenheit_base_unit, double, 32.0);
/// @endcode
Expand Down
2 changes: 1 addition & 1 deletion include/boost/units/base_dimension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class base_dimension :
#else
typedef detail::unspecified dimension_type;
#endif
/// Provided for mpl compatability.
/// Provided for mpl compatibility.
typedef Derived type;

private:
Expand Down
2 changes: 1 addition & 1 deletion include/boost/units/base_unit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class base_unit :
/// The dimensions of this base unit.
typedef Dim dimension_type;

/// Provided for mpl compatability.
/// Provided for mpl compatibility.
typedef Derived type;

/// The unit corresponding to this base unit.
Expand Down
4 changes: 2 additions & 2 deletions include/boost/units/conversion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct conversion_helper;
/// Template for defining conversions between
/// quantities. This template should be specialized
/// for every quantity that allows conversions.
/// For example, if you have a two units
/// For example, if you have two units
/// called pair and dozen you would write
/// @code
/// namespace boost {
Expand Down Expand Up @@ -87,7 +87,7 @@ struct conversion_helper

/// Defines the conversion factor from a base unit to any other base
/// unit with the same dimensions. Params should be a Boost.Preprocessor
/// Seq of template parameters, such as (class T1)(class T2)
/// Seq of template parameters, such as (class T1)(class T2).
/// All uses of must appear at global scope. The reverse conversion will
/// be defined automatically. This macro is a little dangerous, because,
/// unlike the non-template form, it will silently fail if either base
Expand Down
8 changes: 4 additions & 4 deletions include/boost/units/detail/linear_algebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct normalize_units_impl;

struct inconsistent {};

// generally useful utilies.
// generally useful utilities.

template<int N>
struct divide_equation {
Expand Down Expand Up @@ -371,7 +371,7 @@ struct invert_strip_leading_zeroes<false, false> {

// results
// Note that we don't add the pivot row to the
// results here, because it needs to propagated up
// results here, because it needs to propagate up
// to the diagonal.
typedef typename next::new_matrix new_matrix;
typedef typename next::identity_result identity_result;
Expand All @@ -392,7 +392,7 @@ struct invert_strip_leading_zeroes<false, true> {

// results
// Note that we don't add the pivot row to the
// results here, because it needs to propagated up
// results here, because it needs to propagate up
// to the diagonal.
typedef dimensionless_type identity_result;
typedef dimensionless_type new_matrix;
Expand Down Expand Up @@ -738,7 +738,7 @@ struct calculate_base_dimension_coefficients_impl<0> {
};
};

// add_zeroes pushs N zeroes onto the
// add_zeroes pushes N zeroes onto the
// front of a list.
//
// list<rational> add_zeroes(list<rational> l, int N) {
Expand Down
2 changes: 1 addition & 1 deletion include/boost/units/dimension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace units {
/// - @c mpl::negate will return its argument unchanged.
/// - @c mpl::times is defined for any dimensions and adds corresponding exponents.
/// - @c mpl::divides is defined for any dimensions and subtracts the exponents of the
/// right had argument from the corresponding exponents of the left had argument.
/// right hand argument from the corresponding exponents of the left hand argument.
/// Missing base dimension tags are assumed to have an exponent of zero.
/// - @c static_power takes a dimension and a static_rational and multiplies all
/// the exponents of the dimension by the static_rational.
Expand Down
14 changes: 7 additions & 7 deletions include/boost/units/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct base_unit_info
{
return(BaseUnit::name());
}
/// The symbol for the base unit (Returns BaseUnit::symbol() by default)
/// The symbol for the base unit (returns BaseUnit::symbol() by default)
static std::string symbol()
{
return(BaseUnit::symbol()); /// \returns BaseUnit::symbol(), for example "m"
Expand Down Expand Up @@ -238,7 +238,7 @@ inline std::ios_base& engineering_prefix(std::ios_base& ios)
return ios;
}

/// Set flag for binary prefix, so 1024 byte displays as "1 Kib".
/// Set flag for binary prefix, so 1024 byte displays as "1 KiB".
inline std::ios_base& binary_prefix(std::ios_base& ios)
{
(set_autoprefix)(ios, autoprefix_binary);
Expand Down Expand Up @@ -411,7 +411,7 @@ struct scale_name_string_impl<0>
namespace detail {

// These two overloads of symbol_string and name_string will
// will pick up homogeneous_systems. They simply call the
// pick up homogeneous_systems. They simply call the
// appropriate function with a heterogeneous_system.
template<class Dimension,class System, class SubFormatter>
inline std::string
Expand Down Expand Up @@ -481,7 +481,7 @@ to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_i

// This overload catches scaled units that have a single base unit
// raised to the first power. It causes si::nano * si::meters to not
// put parentheses around the meters. i.e. nm rather than n(m)
// put parentheses around the meters, i.e. nm rather than n(m).
/// INTERNAL ONLY
template<class Dimension,class Unit,class Scale, class Subformatter>
inline std::string
Expand All @@ -496,7 +496,7 @@ to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_i
}

// This overload is necessary to disambiguate.
// it catches units that are unscaled and have a single
// It catches units that are unscaled and have a single
// base unit raised to the first power. It is treated the
// same as any other unscaled unit.
/// INTERNAL ONLY
Expand Down Expand Up @@ -547,7 +547,7 @@ to_string_impl(
>()));
}

// this overload disambuguates between the overload for an unscaled unit
// this overload disambiguates between the overload for an unscaled unit
// and the overload for a scaled base unit raised to the first power.
/// INTERNAL ONLY
template<class Dimension,class Unit,class UnitScale,class Subformatter>
Expand Down Expand Up @@ -848,7 +848,7 @@ maybe_parenthesize(const unit<Dimension, heterogeneous_system<heterogeneous_syst

// This overload catches scaled units that have a single base unit
// raised to the first power. It causes si::nano * si::meters to not
// put parentheses around the meters. i.e. nm rather than n(m)
// put parentheses around the meters, i.e. nm rather than n(m)
/// INTERNAL ONLY
template<class Dimension,class Unit,class Scale, class Subformatter>
inline std::string
Expand Down
4 changes: 2 additions & 2 deletions include/boost/units/operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ template<typename X,typename Y> struct root_typeof_helper;
/// conform to the interface shown here.
/// @c Exponent will be either the exponent
/// passed to @c pow or @c static_rational<N>
/// for and integer argument, N.
/// for an integer argument, N.
template<typename BaseType, typename Exponent>
struct power_typeof_helper
{
Expand All @@ -145,7 +145,7 @@ struct power_typeof_helper
/// conform to the interface shown here.
/// @c Index will be either the type
/// passed to @c pow or @c static_rational<N>
/// for and integer argument, N.
/// for an integer argument, N.
template<typename Radicand, typename Index>
struct root_typeof_helper
{
Expand Down
2 changes: 1 addition & 1 deletion include/boost/units/unit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class unit

// sun will ignore errors resulting from templates
// instantiated in the return type of a function.
// Make sure that we get an error anyway by putting.
// Make sure that we get an error anyway by putting
// the check in the destructor.
#ifdef __SUNPRO_CC
~unit() {
Expand Down
2 changes: 1 addition & 1 deletion test/fail_add_temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
\brief fail_add_temperature.cpp

\details
Verify that adding two absolute temeratures fails miserably.
Verify that adding two absolute temperatures fails miserably.

Output:
@verbatim
Expand Down
2 changes: 1 addition & 1 deletion test/test_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void test_output_auto_binary_prefixed_quantity_name()
}

// Tests on using more than one format or prefix - only the last specified should be used.
// (This may indicate a programming mistake, but it is ignored).
// (This may indicate a programming mistake, but it is ignored.)
void test_output_quantity_name_duplicate()
{ // Ensure that if more than one format specified, only the last is used.
#define FORMATTERS << boost::units::symbol_format << boost::units::name_format
Expand Down