|
Boost-Commit : |
From: boost_at_[hidden]
Date: 2008-05-18 20:30:23
Author: matthiasschabel
Date: 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
New Revision: 45508
URL: http://svn.boost.org/trac/boost/changeset/45508
Log:
*** MAJOR ***
potentially breaking changes : rename SI/CGS namespaces to lowercase
remove some non-SI units (mostly obscure)
move base_units into boost/units
move physical_dimensions into boost/units
improved base_units for non-SI
Text files modified:
sandbox/units/boost/units/conversion.hpp | 16
sandbox/units/boost/units/pow.hpp | 1
sandbox/units/boost/units/systems/abstract.hpp | 18
sandbox/units/boost/units/systems/cgs.hpp | 2
sandbox/units/boost/units/systems/cgs/acceleration.hpp | 8
sandbox/units/boost/units/systems/cgs/area.hpp | 8
sandbox/units/boost/units/systems/cgs/base.hpp | 16
sandbox/units/boost/units/systems/cgs/current.hpp | 6
sandbox/units/boost/units/systems/cgs/dimensionless.hpp | 4
sandbox/units/boost/units/systems/cgs/dynamic_viscosity.hpp | 8
sandbox/units/boost/units/systems/cgs/energy.hpp | 8
sandbox/units/boost/units/systems/cgs/force.hpp | 8
sandbox/units/boost/units/systems/cgs/frequency.hpp | 8
sandbox/units/boost/units/systems/cgs/kinematic_viscosity.hpp | 8
sandbox/units/boost/units/systems/cgs/length.hpp | 6
sandbox/units/boost/units/systems/cgs/mass.hpp | 6
sandbox/units/boost/units/systems/cgs/mass_density.hpp | 8
sandbox/units/boost/units/systems/cgs/momentum.hpp | 8
sandbox/units/boost/units/systems/cgs/power.hpp | 8
sandbox/units/boost/units/systems/cgs/pressure.hpp | 8
sandbox/units/boost/units/systems/cgs/time.hpp | 6
sandbox/units/boost/units/systems/cgs/velocity.hpp | 8
sandbox/units/boost/units/systems/cgs/volume.hpp | 8
sandbox/units/boost/units/systems/cgs/wavenumber.hpp | 8
sandbox/units/boost/units/systems/si.hpp | 2
sandbox/units/boost/units/systems/si/absorbed_dose.hpp | 8
sandbox/units/boost/units/systems/si/acceleration.hpp | 8
sandbox/units/boost/units/systems/si/action.hpp | 8
sandbox/units/boost/units/systems/si/activity.hpp | 8
sandbox/units/boost/units/systems/si/amount.hpp | 6
sandbox/units/boost/units/systems/si/angular_velocity.hpp | 8
sandbox/units/boost/units/systems/si/area.hpp | 8
sandbox/units/boost/units/systems/si/base.hpp | 26
sandbox/units/boost/units/systems/si/capacitance.hpp | 6
sandbox/units/boost/units/systems/si/catalytic_activity.hpp | 6
sandbox/units/boost/units/systems/si/codata/alpha_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/atomic_and_nuclear_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/deuteron_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/electromagnetic_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/electron_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/helion_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/muon_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/neutron_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/physico-chemical_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/proton_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/tau_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/triton_constants.hpp | 4
sandbox/units/boost/units/systems/si/codata/typedefs.hpp | 16
sandbox/units/boost/units/systems/si/codata/universal_constants.hpp | 4
sandbox/units/boost/units/systems/si/conductance.hpp | 6
sandbox/units/boost/units/systems/si/conductivity.hpp | 6
sandbox/units/boost/units/systems/si/current.hpp | 6
sandbox/units/boost/units/systems/si/dimensionless.hpp | 4
sandbox/units/boost/units/systems/si/dose_equivalent.hpp | 8
sandbox/units/boost/units/systems/si/dynamic_viscosity.hpp | 8
sandbox/units/boost/units/systems/si/electric_charge.hpp | 6
sandbox/units/boost/units/systems/si/electric_potential.hpp | 6
sandbox/units/boost/units/systems/si/energy.hpp | 8
sandbox/units/boost/units/systems/si/force.hpp | 8
sandbox/units/boost/units/systems/si/frequency.hpp | 8
sandbox/units/boost/units/systems/si/illuminance.hpp | 8
sandbox/units/boost/units/systems/si/impedance.hpp | 6
sandbox/units/boost/units/systems/si/inductance.hpp | 6
sandbox/units/boost/units/systems/si/kinematic_viscosity.hpp | 8
sandbox/units/boost/units/systems/si/length.hpp | 6
sandbox/units/boost/units/systems/si/luminous_flux.hpp | 8
sandbox/units/boost/units/systems/si/luminous_intensity.hpp | 6
sandbox/units/boost/units/systems/si/magnetic_field_intensity.hpp | 6
sandbox/units/boost/units/systems/si/magnetic_flux.hpp | 6
sandbox/units/boost/units/systems/si/magnetic_flux_density.hpp | 6
sandbox/units/boost/units/systems/si/mass.hpp | 6
sandbox/units/boost/units/systems/si/mass_density.hpp | 8
sandbox/units/boost/units/systems/si/momentum.hpp | 8
sandbox/units/boost/units/systems/si/permeability.hpp | 6
sandbox/units/boost/units/systems/si/permittivity.hpp | 6
sandbox/units/boost/units/systems/si/plane_angle.hpp | 6
sandbox/units/boost/units/systems/si/power.hpp | 8
sandbox/units/boost/units/systems/si/prefixes.hpp | 4
sandbox/units/boost/units/systems/si/pressure.hpp | 8
sandbox/units/boost/units/systems/si/reluctance.hpp | 6
sandbox/units/boost/units/systems/si/resistance.hpp | 6
sandbox/units/boost/units/systems/si/resistivity.hpp | 6
sandbox/units/boost/units/systems/si/solid_angle.hpp | 6
sandbox/units/boost/units/systems/si/surface_density.hpp | 8
sandbox/units/boost/units/systems/si/temperature.hpp | 6
sandbox/units/boost/units/systems/si/time.hpp | 6
sandbox/units/boost/units/systems/si/velocity.hpp | 8
sandbox/units/boost/units/systems/si/volume.hpp | 8
sandbox/units/boost/units/systems/si/wavenumber.hpp | 8
sandbox/units/boost/units/systems/trig.hpp | 40
sandbox/units/libs/units/example/composite_output.cpp | 4
sandbox/units/libs/units/example/conversion.cpp | 30
sandbox/units/libs/units/example/conversion_factor.cpp | 10
sandbox/units/libs/units/example/heterogeneous_unit.cpp | 14
sandbox/units/libs/units/example/kitchen_sink.cpp | 14
sandbox/units/libs/units/example/non_base_dimension.cpp | 2
sandbox/units/libs/units/example/performance.cpp | 30
sandbox/units/libs/units/example/radar_beam_height.cpp | 16
sandbox/units/libs/units/example/runtime_unit.cpp | 15
sandbox/units/libs/units/example/systems.cpp | 1182 +++++++++++++++++++++++++++++++++------
sandbox/units/libs/units/example/temperature.cpp | 18
sandbox/units/libs/units/example/tutorial.cpp | 4
sandbox/units/libs/units/test/fail_add_temperature.cpp | 2
sandbox/units/libs/units/test/fail_adl_detail.cpp | 2
sandbox/units/libs/units/test/fail_heterogeneous_unit.cpp | 9
sandbox/units/libs/units/test/fail_implicit_conversion.cpp | 4
sandbox/units/libs/units/test/fail_quantity_add.cpp | 2
sandbox/units/libs/units/test/fail_quantity_add_assign.cpp | 4
sandbox/units/libs/units/test/fail_quantity_assign.cpp | 4
sandbox/units/libs/units/test/fail_quantity_construct.cpp | 2
sandbox/units/libs/units/test/fail_quantity_non_unit.cpp | 2
sandbox/units/libs/units/test/fail_quantity_scalar_add.cpp | 2
sandbox/units/libs/units/test/fail_quantity_scalar_sub.cpp | 2
sandbox/units/libs/units/test/fail_quantity_sub_assign.cpp | 4
sandbox/units/libs/units/test/fail_quantity_subtract.cpp | 2
sandbox/units/libs/units/test/fail_quantity_unit_add.cpp | 2
sandbox/units/libs/units/test/fail_quantity_unit_subtract.cpp | 2
sandbox/units/libs/units/test/fail_scalar_quantity_add.cpp | 2
sandbox/units/libs/units/test/fail_scalar_quantity_sub.cpp | 2
sandbox/units/libs/units/test/fail_unit_quantity_add.cpp | 2
sandbox/units/libs/units/test/fail_unit_quantity_subtract.cpp | 2
sandbox/units/libs/units/test/test_absolute.cpp | 10
sandbox/units/libs/units/test/test_conversion.cpp | 38
sandbox/units/libs/units/test/test_dimensionless_ice1.cpp | 2
sandbox/units/libs/units/test/test_dimensionless_ice2.cpp | 2
sandbox/units/libs/units/test/test_implicit_conversion.cpp | 134 ++--
sandbox/units/libs/units/tutorial/tutorial_1.cpp | 6
127 files changed, 1538 insertions(+), 709 deletions(-)
Modified: sandbox/units/boost/units/conversion.hpp
==============================================================================
--- sandbox/units/boost/units/conversion.hpp (original)
+++ sandbox/units/boost/units/conversion.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -136,6 +136,22 @@
} \
void boost_units_require_semicolon()
+/// template that defines a base_unit and conversion to another dimensionally-consistent unit
+#define BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(namespace_, name_, name_string_, symbol_string_, factor, unit, id)\
+namespace boost { \
+namespace units { \
+namespace namespace_ { \
+struct name_ ## _base_unit \
+ : base_unit<name_ ## _base_unit, unit::dimension_type, id> { \
+ static const char* name() { return(name_string_); } \
+ static const char* symbol() { return(symbol_string_); }; \
+}; \
+} \
+} \
+} \
+BOOST_UNITS_DEFINE_CONVERSION_FACTOR(namespace_::name_ ## _base_unit, unit, double, factor); \
+BOOST_UNITS_DEFAULT_CONVERSION(namespace_::name_ ## _base_unit, unit)
+
/// Find the conversion factor between two units.
template<class FromUnit,class ToUnit>
inline
Modified: sandbox/units/boost/units/pow.hpp
==============================================================================
--- sandbox/units/boost/units/pow.hpp (original)
+++ sandbox/units/boost/units/pow.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -11,6 +11,7 @@
#ifndef BOOST_UNITS_POW_HPP
#define BOOST_UNITS_POW_HPP
+#include <boost/math_fwd.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/units/operators.hpp>
Modified: sandbox/units/boost/units/systems/abstract.hpp
==============================================================================
--- sandbox/units/boost/units/systems/abstract.hpp (original)
+++ sandbox/units/boost/units/systems/abstract.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -19,15 +19,15 @@
#include <boost/units/make_system.hpp>
#include <boost/units/base_unit.hpp>
-#include <boost/units/systems/physical_dimensions/amount.hpp>
-#include <boost/units/systems/physical_dimensions/current.hpp>
-#include <boost/units/systems/physical_dimensions/length.hpp>
-#include <boost/units/systems/physical_dimensions/luminous_intensity.hpp>
-#include <boost/units/systems/physical_dimensions/mass.hpp>
-#include <boost/units/systems/physical_dimensions/plane_angle.hpp>
-#include <boost/units/systems/physical_dimensions/solid_angle.hpp>
-#include <boost/units/systems/physical_dimensions/temperature.hpp>
-#include <boost/units/systems/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/amount.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/luminous_intensity.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+#include <boost/units/physical_dimensions/solid_angle.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
namespace boost {
Modified: sandbox/units/boost/units/systems/cgs.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs.hpp (original)
+++ sandbox/units/boost/units/systems/cgs.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,7 +12,7 @@
#define BOOST_UNITS_CGS_HPP
/// \file
-/// Includes all the CGS unit headers
+/// Includes all the cgs unit headers
#include <string>
Modified: sandbox/units/boost/units/systems/cgs/acceleration.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/acceleration.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/acceleration.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_ACCELERATION_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/acceleration.hpp>
+#include <boost/units/physical_dimensions/acceleration.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<acceleration_dimension,CGS::system> acceleration;
+typedef unit<acceleration_dimension,cgs::system> acceleration;
BOOST_UNITS_STATIC_CONSTANT(gal,acceleration);
BOOST_UNITS_STATIC_CONSTANT(gals,acceleration);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/area.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/area.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/area.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_CGS_AREA_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/area.hpp>
+#include <boost/units/physical_dimensions/area.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<area_dimension,CGS::system> area;
+typedef unit<area_dimension,cgs::system> area;
BOOST_UNITS_STATIC_CONSTANT(square_centimeter,area);
BOOST_UNITS_STATIC_CONSTANT(square_centimeters,area);
BOOST_UNITS_STATIC_CONSTANT(square_centimetre,area);
BOOST_UNITS_STATIC_CONSTANT(square_centimetres,area);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/base.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/base.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/base.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,27 +18,27 @@
#include <boost/units/unit.hpp>
#include <boost/units/make_system.hpp>
-#include <boost/units/systems/CGS/base_units/centimeter.hpp>
-#include <boost/units/systems/CGS/base_units/gram.hpp>
-#include <boost/units/systems/SI/base_units/second.hpp>
-#include <boost/units/systems/CGS/base_units/biot.hpp>
+#include <boost/units/base_units/cgs/centimeter.hpp>
+#include <boost/units/base_units/cgs/gram.hpp>
+#include <boost/units/base_units/si/second.hpp>
+#include <boost/units/base_units/cgs/biot.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-/// placeholder class defining CGS unit system
+/// placeholder class defining cgs unit system
typedef make_system<centimeter_base_unit,
gram_base_unit,
- boost::units::SI::second_base_unit,
+ boost::units::si::second_base_unit,
biot_base_unit>::type system;
/// various unit typedefs for convenience
typedef unit<dimensionless_type,system> dimensionless;
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/current.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/current.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/current.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<current_dimension,CGS::system> current;
+typedef unit<current_dimension,cgs::system> current;
BOOST_UNITS_STATIC_CONSTANT(ampere,current);
BOOST_UNITS_STATIC_CONSTANT(amperes,current);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/dimensionless.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/dimensionless.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/dimensionless.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,11 +17,11 @@
namespace units {
-namespace CGS {
+namespace cgs {
BOOST_UNITS_STATIC_CONSTANT(cgs_dimensionless,dimensionless);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/dynamic_viscosity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/dynamic_viscosity.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/dynamic_viscosity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,19 +12,19 @@
#define BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/dynamic_viscosity.hpp>
+#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<dynamic_viscosity_dimension,CGS::system> dynamic_viscosity;
+typedef unit<dynamic_viscosity_dimension,cgs::system> dynamic_viscosity;
BOOST_UNITS_STATIC_CONSTANT(poise,dynamic_viscosity);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/energy.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/energy.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/energy.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_ENERGY_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/energy.hpp>
+#include <boost/units/physical_dimensions/energy.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<energy_dimension,CGS::system> energy;
+typedef unit<energy_dimension,cgs::system> energy;
BOOST_UNITS_STATIC_CONSTANT(erg,energy);
BOOST_UNITS_STATIC_CONSTANT(ergs,energy);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/force.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/force.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/force.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_FORCE_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/force.hpp>
+#include <boost/units/physical_dimensions/force.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<force_dimension,CGS::system> force;
+typedef unit<force_dimension,cgs::system> force;
BOOST_UNITS_STATIC_CONSTANT(dyne,force);
BOOST_UNITS_STATIC_CONSTANT(dynes,force);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/frequency.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/frequency.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/frequency.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_FREQUENCY_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/frequency.hpp>
+#include <boost/units/physical_dimensions/frequency.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<frequency_dimension,CGS::system> frequency;
+typedef unit<frequency_dimension,cgs::system> frequency;
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/kinematic_viscosity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/kinematic_viscosity.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/kinematic_viscosity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/kinematic_viscosity.hpp>
+#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<kinematic_viscosity_dimension,CGS::system> kinematic_viscosity;
+typedef unit<kinematic_viscosity_dimension,cgs::system> kinematic_viscosity;
BOOST_UNITS_STATIC_CONSTANT(stoke,kinematic_viscosity);
BOOST_UNITS_STATIC_CONSTANT(stokes,kinematic_viscosity);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/length.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/length.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/length.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,16 +17,16 @@
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<length_dimension,CGS::system> length;
+typedef unit<length_dimension,cgs::system> length;
BOOST_UNITS_STATIC_CONSTANT(centimeter,length);
BOOST_UNITS_STATIC_CONSTANT(centimeters,length);
BOOST_UNITS_STATIC_CONSTANT(centimetre,length);
BOOST_UNITS_STATIC_CONSTANT(centimetres,length);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/mass.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/mass.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/mass.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,9 +17,9 @@
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<mass_dimension,CGS::system> mass;
+typedef unit<mass_dimension,cgs::system> mass;
BOOST_UNITS_STATIC_CONSTANT(gram,mass);
BOOST_UNITS_STATIC_CONSTANT(grams,mass);
@@ -27,7 +27,7 @@
BOOST_UNITS_STATIC_CONSTANT(grammes,mass);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/mass_density.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/mass_density.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/mass_density.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_MASS_DENSITY_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/mass_density.hpp>
+#include <boost/units/physical_dimensions/mass_density.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<mass_density_dimension,CGS::system> mass_density;
+typedef unit<mass_density_dimension,cgs::system> mass_density;
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/momentum.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/momentum.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/momentum.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_MOMENTUM_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/momentum.hpp>
+#include <boost/units/physical_dimensions/momentum.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<momentum_dimension,CGS::system> momentum;
+typedef unit<momentum_dimension,cgs::system> momentum;
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/power.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/power.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/power.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_POWER_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/power.hpp>
+#include <boost/units/physical_dimensions/power.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<power_dimension,CGS::system> power;
+typedef unit<power_dimension,cgs::system> power;
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/pressure.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/pressure.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/pressure.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_PRESSURE_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/pressure.hpp>
+#include <boost/units/physical_dimensions/pressure.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<pressure_dimension,CGS::system> pressure;
+typedef unit<pressure_dimension,cgs::system> pressure;
BOOST_UNITS_STATIC_CONSTANT(barye,pressure);
BOOST_UNITS_STATIC_CONSTANT(baryes,pressure);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/time.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/time.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/time.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<time_dimension,CGS::system> time;
+typedef unit<time_dimension,cgs::system> time;
BOOST_UNITS_STATIC_CONSTANT(second,time);
BOOST_UNITS_STATIC_CONSTANT(seconds,time);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/velocity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/velocity.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/velocity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_CGS_VELOCITY_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/velocity.hpp>
+#include <boost/units/physical_dimensions/velocity.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<velocity_dimension,CGS::system> velocity;
+typedef unit<velocity_dimension,cgs::system> velocity;
BOOST_UNITS_STATIC_CONSTANT(centimeter_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(centimeters_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(centimetre_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(centimetres_per_second,velocity);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/volume.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/volume.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/volume.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_CGS_VOLUME_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/volume.hpp>
+#include <boost/units/physical_dimensions/volume.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<volume_dimension,CGS::system> volume;
+typedef unit<volume_dimension,cgs::system> volume;
BOOST_UNITS_STATIC_CONSTANT(cubic_centimeter,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_centimeters,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_centimetre,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_centimetres,volume);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/cgs/wavenumber.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/wavenumber.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/wavenumber.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,15 +12,15 @@
#define BOOST_UNITS_CGS_WAVENUMBER_HPP
#include <boost/units/systems/cgs/base.hpp>
-#include <boost/units/systems/physical_dimensions/wavenumber.hpp>
+#include <boost/units/physical_dimensions/wavenumber.hpp>
namespace boost {
namespace units {
-namespace CGS {
+namespace cgs {
-typedef unit<wavenumber_dimension,CGS::system> wavenumber;
+typedef unit<wavenumber_dimension,cgs::system> wavenumber;
BOOST_UNITS_STATIC_CONSTANT(kayser,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(kaysers,wavenumber);
@@ -29,7 +29,7 @@
BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetre,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetres,wavenumber);
-} // namespace CGS
+} // namespace cgs
} // namespace units
Modified: sandbox/units/boost/units/systems/si.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si.hpp (original)
+++ sandbox/units/boost/units/systems/si.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,7 +12,7 @@
#define BOOST_UNITS_SI_HPP
/// \file
-/// Includes all the SI unit headers
+/// Includes all the si unit headers
#include <string>
Modified: sandbox/units/boost/units/systems/si/absorbed_dose.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/absorbed_dose.hpp (original)
+++ sandbox/units/boost/units/systems/si/absorbed_dose.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ABSORBED_DOSE_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/absorbed_dose.hpp>
+#include <boost/units/physical_dimensions/absorbed_dose.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<absorbed_dose_dimension,SI::system> absorbed_dose;
+typedef unit<absorbed_dose_dimension,si::system> absorbed_dose;
BOOST_UNITS_STATIC_CONSTANT(gray,absorbed_dose);
BOOST_UNITS_STATIC_CONSTANT(grays,absorbed_dose);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/acceleration.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/acceleration.hpp (original)
+++ sandbox/units/boost/units/systems/si/acceleration.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_ACCELERATION_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/acceleration.hpp>
+#include <boost/units/physical_dimensions/acceleration.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<acceleration_dimension,SI::system> acceleration;
+typedef unit<acceleration_dimension,si::system> acceleration;
BOOST_UNITS_STATIC_CONSTANT(meter_per_second_squared,acceleration);
BOOST_UNITS_STATIC_CONSTANT(meters_per_second_squared,acceleration);
BOOST_UNITS_STATIC_CONSTANT(metre_per_second_squared,acceleration);
BOOST_UNITS_STATIC_CONSTANT(metres_per_second_squared,acceleration);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/action.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/action.hpp (original)
+++ sandbox/units/boost/units/systems/si/action.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_ACTION_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/action.hpp>
+#include <boost/units/physical_dimensions/action.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<action_dimension,SI::system> action;
+typedef unit<action_dimension,si::system> action;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/activity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/activity.hpp (original)
+++ sandbox/units/boost/units/systems/si/activity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ACTIVITY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/activity.hpp>
+#include <boost/units/physical_dimensions/activity.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<activity_dimension,SI::system> activity;
+typedef unit<activity_dimension,si::system> activity;
BOOST_UNITS_STATIC_CONSTANT(becquerel,activity);
BOOST_UNITS_STATIC_CONSTANT(becquerels,activity);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/amount.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/amount.hpp (original)
+++ sandbox/units/boost/units/systems/si/amount.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<amount_dimension,SI::system> amount;
+typedef unit<amount_dimension,si::system> amount;
BOOST_UNITS_STATIC_CONSTANT(mole,amount);
BOOST_UNITS_STATIC_CONSTANT(moles,amount);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/angular_velocity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/angular_velocity.hpp (original)
+++ sandbox/units/boost/units/systems/si/angular_velocity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/angular_velocity.hpp>
+#include <boost/units/physical_dimensions/angular_velocity.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<angular_velocity_dimension,SI::system> angular_velocity;
+typedef unit<angular_velocity_dimension,si::system> angular_velocity;
BOOST_UNITS_STATIC_CONSTANT(radian_per_second,angular_velocity);
BOOST_UNITS_STATIC_CONSTANT(radians_per_second,angular_velocity);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/area.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/area.hpp (original)
+++ sandbox/units/boost/units/systems/si/area.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_AREA_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/area.hpp>
+#include <boost/units/physical_dimensions/area.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<area_dimension,SI::system> area;
+typedef unit<area_dimension,si::system> area;
BOOST_UNITS_STATIC_CONSTANT(square_meter,area);
BOOST_UNITS_STATIC_CONSTANT(square_meters,area);
BOOST_UNITS_STATIC_CONSTANT(square_metre,area);
BOOST_UNITS_STATIC_CONSTANT(square_metres,area);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/base.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/base.hpp (original)
+++ sandbox/units/boost/units/systems/si/base.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,23 +18,23 @@
#include <boost/units/unit.hpp>
#include <boost/units/make_system.hpp>
-#include <boost/units/systems/SI/base_units/meter.hpp>
-#include <boost/units/systems/SI/base_units/kilogram.hpp>
-#include <boost/units/systems/SI/base_units/second.hpp>
-#include <boost/units/systems/SI/base_units/ampere.hpp>
-#include <boost/units/systems/SI/base_units/kelvin.hpp>
-#include <boost/units/systems/SI/base_units/mole.hpp>
-#include <boost/units/systems/SI/base_units/candela.hpp>
-#include <boost/units/systems/angle/base_units/radian.hpp>
-#include <boost/units/systems/angle/base_units/steradian.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+#include <boost/units/base_units/si/kilogram.hpp>
+#include <boost/units/base_units/si/second.hpp>
+#include <boost/units/base_units/si/ampere.hpp>
+#include <boost/units/base_units/si/kelvin.hpp>
+#include <boost/units/base_units/si/mole.hpp>
+#include <boost/units/base_units/si/candela.hpp>
+#include <boost/units/base_units/angle/radian.hpp>
+#include <boost/units/base_units/angle/steradian.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-/// placeholder class defining SI unit system
+/// placeholder class defining si unit system
typedef make_system<meter_base_unit,
kilogram_base_unit,
second_base_unit,
@@ -45,10 +45,10 @@
boost::units::angle::radian_base_unit,
boost::units::angle::steradian_base_unit>::type system;
-/// dimensionless SI unit
+/// dimensionless si unit
typedef unit<dimensionless_type,system> dimensionless;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/capacitance.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/capacitance.hpp (original)
+++ sandbox/units/boost/units/systems/si/capacitance.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// capacitance : L^-2 M^-1 T^4 I^2
typedef derived_dimension<length_base_dimension,-2,mass_base_dimension,-1,time_base_dimension,4,current_base_dimension,2>::type capacitance_type;
-typedef unit<SI::capacitance_type,SI::system> capacitance;
+typedef unit<si::capacitance_type,si::system> capacitance;
BOOST_UNITS_STATIC_CONSTANT(farad,capacitance);
BOOST_UNITS_STATIC_CONSTANT(farads,capacitance);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/catalytic_activity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/catalytic_activity.hpp (original)
+++ sandbox/units/boost/units/systems/si/catalytic_activity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// catalytic activity : T^-1 A^1
typedef derived_dimension<time_base_dimension,-1,amount_base_dimension,1>::type catalytic_activity_dim;
-typedef unit<SI::catalytic_activity_dim,SI::system> catalytic_activity;
+typedef unit<si::catalytic_activity_dim,si::system> catalytic_activity;
BOOST_UNITS_STATIC_CONSTANT(katal,catalytic_activity);
BOOST_UNITS_STATIC_CONSTANT(katals,catalytic_activity);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/alpha_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/alpha_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/alpha_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -56,7 +56,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/atomic_and_nuclear_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/atomic_and_nuclear_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/atomic_and_nuclear_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -25,7 +25,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -47,7 +47,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/deuteron_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/deuteron_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/deuteron_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -72,7 +72,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/electromagnetic_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/electromagnetic_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/electromagnetic_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -34,7 +34,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -64,7 +64,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/electron_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/electron_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/electron_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -96,7 +96,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/helion_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/helion_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/helion_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -68,7 +68,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/muon_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/muon_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/muon_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -74,7 +74,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/neutron_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/neutron_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/neutron_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -74,7 +74,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/physico-chemical_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/physico-chemical_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/physico-chemical_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -69,7 +69,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/proton_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/proton_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/proton_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -88,7 +88,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/tau_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/tau_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/tau_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -62,7 +62,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/triton_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/triton_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/triton_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -70,7 +70,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/typedefs.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/typedefs.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/typedefs.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -34,7 +34,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -50,9 +50,9 @@
typedef divide_typeof_helper<energy,temperature>::type energy_over_temperature;
typedef divide_typeof_helper<energy_over_temperature,amount>::type energy_over_temperature_amount;
typedef divide_typeof_helper<
- divide_typeof_helper<power,area>::type,
- power_typeof_helper<temperature,static_rational<4> >::type
->::type power_over_area_temperature_4;
+ divide_typeof_helper<power,area>::type,
+ power_typeof_helper<temperature,static_rational<4> >::type
+ >::type power_over_area_temperature_4;
typedef multiply_typeof_helper<power,area>::type power_area;
typedef divide_typeof_helper<power_area,solid_angle>::type power_area_over_solid_angle;
typedef multiply_typeof_helper<length,temperature>::type length_temperature;
@@ -60,9 +60,9 @@
typedef divide_typeof_helper<divide_typeof_helper<force,current>::type,current>::type force_over_current_squared;
typedef divide_typeof_helper<capacitance,length>::type capacitance_over_length;
typedef divide_typeof_helper<
- divide_typeof_helper<divide_typeof_helper<volume,mass>::type,time>::type,
- time
->::type volume_over_mass_time_squared;
+ divide_typeof_helper<divide_typeof_helper<volume,mass>::type,time>::type,
+ time
+ >::type volume_over_mass_time_squared;
typedef multiply_typeof_helper<energy,time>::type energy_time;
typedef divide_typeof_helper<electric_charge,amount>::type electric_charge_over_amount;
@@ -70,7 +70,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/codata/universal_constants.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/codata/universal_constants.hpp (original)
+++ sandbox/units/boost/units/systems/si/codata/universal_constants.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -35,7 +35,7 @@
namespace units {
-namespace SI {
+namespace si {
namespace constants {
@@ -71,7 +71,7 @@
} // namespace constants
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/conductance.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/conductance.hpp (original)
+++ sandbox/units/boost/units/systems/si/conductance.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,19 +18,19 @@
namespace units {
-namespace SI {
+namespace si {
/// conductance : L^-2 M^-1 T^3 I^2
typedef derived_dimension<length_base_dimension,-2,mass_base_dimension,-1,time_base_dimension,3,current_base_dimension,2>::type conductance_type;
-typedef unit<SI::conductance_type,SI::system> conductance;
+typedef unit<si::conductance_type,si::system> conductance;
BOOST_UNITS_STATIC_CONSTANT(siemen,conductance);
BOOST_UNITS_STATIC_CONSTANT(siemens,conductance);
BOOST_UNITS_STATIC_CONSTANT(mho,conductance);
BOOST_UNITS_STATIC_CONSTANT(mhos,conductance);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/conductivity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/conductivity.hpp (original)
+++ sandbox/units/boost/units/systems/si/conductivity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,14 +18,14 @@
namespace units {
-namespace SI {
+namespace si {
/// conductivity : L^-3 M^-1 T^3 I^2
typedef derived_dimension<length_base_dimension,-3,mass_base_dimension,-1,time_base_dimension,3,current_base_dimension,2>::type conductivity_type;
-typedef unit<SI::conductivity_type,SI::system> conductivity;
+typedef unit<si::conductivity_type,si::system> conductivity;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/current.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/current.hpp (original)
+++ sandbox/units/boost/units/systems/si/current.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<current_dimension,SI::system> current;
+typedef unit<current_dimension,si::system> current;
BOOST_UNITS_STATIC_CONSTANT(ampere,current);
BOOST_UNITS_STATIC_CONSTANT(amperes,current);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/dimensionless.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/dimensionless.hpp (original)
+++ sandbox/units/boost/units/systems/si/dimensionless.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,11 +17,11 @@
namespace units {
-namespace SI {
+namespace si {
BOOST_UNITS_STATIC_CONSTANT(si_dimensionless,dimensionless);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/dose_equivalent.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/dose_equivalent.hpp (original)
+++ sandbox/units/boost/units/systems/si/dose_equivalent.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/dose_equivalent.hpp>
+#include <boost/units/physical_dimensions/dose_equivalent.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<dose_equivalent_dimension,SI::system> dose_equivalent;
+typedef unit<dose_equivalent_dimension,si::system> dose_equivalent;
BOOST_UNITS_STATIC_CONSTANT(sievert,dose_equivalent);
BOOST_UNITS_STATIC_CONSTANT(sieverts,dose_equivalent);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/dynamic_viscosity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/dynamic_viscosity.hpp (original)
+++ sandbox/units/boost/units/systems/si/dynamic_viscosity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/dynamic_viscosity.hpp>
+#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<dynamic_viscosity_dimension,SI::system> dynamic_viscosity;
+typedef unit<dynamic_viscosity_dimension,si::system> dynamic_viscosity;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/electric_charge.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/electric_charge.hpp (original)
+++ sandbox/units/boost/units/systems/si/electric_charge.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// electric charge : T^1 I^1
typedef derived_dimension<time_base_dimension,1,current_base_dimension,1>::type electric_charge_type;
-typedef unit<SI::electric_charge_type,SI::system> electric_charge;
+typedef unit<si::electric_charge_type,si::system> electric_charge;
BOOST_UNITS_STATIC_CONSTANT(coulomb,electric_charge);
BOOST_UNITS_STATIC_CONSTANT(coulombs,electric_charge);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/electric_potential.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/electric_potential.hpp (original)
+++ sandbox/units/boost/units/systems/si/electric_potential.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// electric potential : L^2 M T^-3 I^-1
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-1>::type electric_potential_type;
-typedef unit<SI::electric_potential_type,SI::system> electric_potential;
+typedef unit<si::electric_potential_type,si::system> electric_potential;
BOOST_UNITS_STATIC_CONSTANT(volt,electric_potential);
BOOST_UNITS_STATIC_CONSTANT(volts,electric_potential);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/energy.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/energy.hpp (original)
+++ sandbox/units/boost/units/systems/si/energy.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ENERGY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/energy.hpp>
+#include <boost/units/physical_dimensions/energy.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<energy_dimension,SI::system> energy;
+typedef unit<energy_dimension,si::system> energy;
BOOST_UNITS_STATIC_CONSTANT(joule,energy);
BOOST_UNITS_STATIC_CONSTANT(joules,energy);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/force.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/force.hpp (original)
+++ sandbox/units/boost/units/systems/si/force.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_FORCE_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/force.hpp>
+#include <boost/units/physical_dimensions/force.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<force_dimension,SI::system> force;
+typedef unit<force_dimension,si::system> force;
BOOST_UNITS_STATIC_CONSTANT(newton,force);
BOOST_UNITS_STATIC_CONSTANT(newtons,force);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/frequency.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/frequency.hpp (original)
+++ sandbox/units/boost/units/systems/si/frequency.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,19 +12,19 @@
#define BOOST_UNITS_SI_FREQUENCY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/frequency.hpp>
+#include <boost/units/physical_dimensions/frequency.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<frequency_dimension,SI::system> frequency;
+typedef unit<frequency_dimension,si::system> frequency;
BOOST_UNITS_STATIC_CONSTANT(hertz,frequency);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/illuminance.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/illuminance.hpp (original)
+++ sandbox/units/boost/units/systems/si/illuminance.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,19 +12,19 @@
#define BOOST_UNITS_SI_ILLUMINANCE_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/illuminance.hpp>
+#include <boost/units/physical_dimensions/illuminance.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<illuminance_dimension,SI::system> illuminance;
+typedef unit<illuminance_dimension,si::system> illuminance;
BOOST_UNITS_STATIC_CONSTANT(lux,illuminance);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/impedance.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/impedance.hpp (original)
+++ sandbox/units/boost/units/systems/si/impedance.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,14 +18,14 @@
namespace units {
-namespace SI {
+namespace si {
/// impedance : L^2 M T^-3 I^-2
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-2>::type impedance_type;
-typedef unit<SI::impedance_type,SI::system> impedance;
+typedef unit<si::impedance_type,si::system> impedance;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/inductance.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/inductance.hpp (original)
+++ sandbox/units/boost/units/systems/si/inductance.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// inductance : L^2 M T^-2 I^-2
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-2>::type inductance_type;
-typedef unit<SI::inductance_type,SI::system> inductance;
+typedef unit<si::inductance_type,si::system> inductance;
BOOST_UNITS_STATIC_CONSTANT(henry,inductance);
BOOST_UNITS_STATIC_CONSTANT(henrys,inductance);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/kinematic_viscosity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/kinematic_viscosity.hpp (original)
+++ sandbox/units/boost/units/systems/si/kinematic_viscosity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/kinematic_viscosity.hpp>
+#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<kinematic_viscosity_dimension,SI::system> kinematic_viscosity;
+typedef unit<kinematic_viscosity_dimension,si::system> kinematic_viscosity;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/length.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/length.hpp (original)
+++ sandbox/units/boost/units/systems/si/length.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,16 +17,16 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<length_dimension,SI::system> length;
+typedef unit<length_dimension,si::system> length;
BOOST_UNITS_STATIC_CONSTANT(meter,length);
BOOST_UNITS_STATIC_CONSTANT(meters,length);
BOOST_UNITS_STATIC_CONSTANT(metre,length);
BOOST_UNITS_STATIC_CONSTANT(metres,length);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/luminous_flux.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/luminous_flux.hpp (original)
+++ sandbox/units/boost/units/systems/si/luminous_flux.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/luminous_flux.hpp>
+#include <boost/units/physical_dimensions/luminous_flux.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<luminous_flux_dimension,SI::system> luminous_flux;
+typedef unit<luminous_flux_dimension,si::system> luminous_flux;
BOOST_UNITS_STATIC_CONSTANT(lumen,luminous_flux);
BOOST_UNITS_STATIC_CONSTANT(lumens,luminous_flux);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/luminous_intensity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/luminous_intensity.hpp (original)
+++ sandbox/units/boost/units/systems/si/luminous_intensity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<luminous_intensity_dimension,SI::system> luminous_intensity;
+typedef unit<luminous_intensity_dimension,si::system> luminous_intensity;
BOOST_UNITS_STATIC_CONSTANT(candela,luminous_intensity);
BOOST_UNITS_STATIC_CONSTANT(candelas,luminous_intensity);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/magnetic_field_intensity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/magnetic_field_intensity.hpp (original)
+++ sandbox/units/boost/units/systems/si/magnetic_field_intensity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,14 +18,14 @@
namespace units {
-namespace SI {
+namespace si {
/// magnetic field intensity : L^-1 I
typedef derived_dimension<length_base_dimension,-1,current_base_dimension,1>::type magnetic_field_intensity_type;
-typedef unit<SI::magnetic_field_intensity_type,SI::system> magnetic_field_intensity;
+typedef unit<si::magnetic_field_intensity_type,si::system> magnetic_field_intensity;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/magnetic_flux.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/magnetic_flux.hpp (original)
+++ sandbox/units/boost/units/systems/si/magnetic_flux.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// magnetic flux : L^2 M T^-2 I^-1
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-1>::type magnetic_flux_type;
-typedef unit<SI::magnetic_flux_type,SI::system> magnetic_flux;
+typedef unit<si::magnetic_flux_type,si::system> magnetic_flux;
BOOST_UNITS_STATIC_CONSTANT(weber,magnetic_flux);
BOOST_UNITS_STATIC_CONSTANT(webers,magnetic_flux);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/magnetic_flux_density.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/magnetic_flux_density.hpp (original)
+++ sandbox/units/boost/units/systems/si/magnetic_flux_density.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// magnetic flux density : M T^-2 I^-1
typedef derived_dimension<mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-1>::type magnetic_flux_density_type;
-typedef unit<SI::magnetic_flux_density_type,SI::system> magnetic_flux_density;
+typedef unit<si::magnetic_flux_density_type,si::system> magnetic_flux_density;
BOOST_UNITS_STATIC_CONSTANT(tesla,magnetic_flux_density);
BOOST_UNITS_STATIC_CONSTANT(teslas,magnetic_flux_density);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/mass.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/mass.hpp (original)
+++ sandbox/units/boost/units/systems/si/mass.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,16 +17,16 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<mass_dimension,SI::system> mass;
+typedef unit<mass_dimension,si::system> mass;
BOOST_UNITS_STATIC_CONSTANT(kilogram,mass);
BOOST_UNITS_STATIC_CONSTANT(kilograms,mass);
BOOST_UNITS_STATIC_CONSTANT(kilogramme,mass);
BOOST_UNITS_STATIC_CONSTANT(kilogrammes,mass);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/mass_density.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/mass_density.hpp (original)
+++ sandbox/units/boost/units/systems/si/mass_density.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_MASS_DENSITY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/mass_density.hpp>
+#include <boost/units/physical_dimensions/mass_density.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<mass_density_dimension,SI::system> mass_density;
+typedef unit<mass_density_dimension,si::system> mass_density;
BOOST_UNITS_STATIC_CONSTANT(kilogram_per_cubic_meter,mass_density);
BOOST_UNITS_STATIC_CONSTANT(kilograms_per_cubic_meter,mass_density);
BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_cubic_metre,mass_density);
BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_cubic_metre,mass_density);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/momentum.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/momentum.hpp (original)
+++ sandbox/units/boost/units/systems/si/momentum.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_MOMENTUM_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/momentum.hpp>
+#include <boost/units/physical_dimensions/momentum.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<momentum_dimension,SI::system> momentum;
+typedef unit<momentum_dimension,si::system> momentum;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/permeability.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/permeability.hpp (original)
+++ sandbox/units/boost/units/systems/si/permeability.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,14 +18,14 @@
namespace units {
-namespace SI {
+namespace si {
/// permeability : L M T^-2 I^-2
typedef derived_dimension<length_base_dimension,1,mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-2>::type permeability_type;
-typedef unit<SI::permeability_type,SI::system> permeability;
+typedef unit<si::permeability_type,si::system> permeability;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/permittivity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/permittivity.hpp (original)
+++ sandbox/units/boost/units/systems/si/permittivity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,14 +18,14 @@
namespace units {
-namespace SI {
+namespace si {
/// permittivity : L^-3 M^-1 T^4 I^2
typedef derived_dimension<length_base_dimension,-3,mass_base_dimension,-1,time_base_dimension,4,current_base_dimension,2>::type permittivity_type;
-typedef unit<SI::permittivity_type,SI::system> permittivity;
+typedef unit<si::permittivity_type,si::system> permittivity;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/plane_angle.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/plane_angle.hpp (original)
+++ sandbox/units/boost/units/systems/si/plane_angle.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<plane_angle_dimension,SI::system> plane_angle;
+typedef unit<plane_angle_dimension,si::system> plane_angle;
BOOST_UNITS_STATIC_CONSTANT(radian,plane_angle);
BOOST_UNITS_STATIC_CONSTANT(radians,plane_angle);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/power.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/power.hpp (original)
+++ sandbox/units/boost/units/systems/si/power.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_POWER_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/power.hpp>
+#include <boost/units/physical_dimensions/power.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<power_dimension,SI::system> power;
+typedef unit<power_dimension,si::system> power;
BOOST_UNITS_STATIC_CONSTANT(watt,power);
BOOST_UNITS_STATIC_CONSTANT(watts,power);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/prefixes.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/prefixes.hpp (original)
+++ sandbox/units/boost/units/systems/si/prefixes.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,7 +17,7 @@
namespace units {
-namespace SI {
+namespace si {
//#define BOOST_UNITS_METRIC_PREFIX(exponent, name) \
// typedef make_scaled_unit<dimensionless, scale<10, static_rational<exponent> > >::type name ## _type;\
@@ -65,7 +65,7 @@
BOOST_UNITS_STATIC_CONSTANT(zetta,long double) = (1e21); ///< metric prefix for 1.0e+21
BOOST_UNITS_STATIC_CONSTANT(yotta,long double) = (1e24); ///< metric prefix for 1.0e+24
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/pressure.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/pressure.hpp (original)
+++ sandbox/units/boost/units/systems/si/pressure.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,15 +12,15 @@
#define BOOST_UNITS_SI_PRESSURE_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/pressure.hpp>
+#include <boost/units/physical_dimensions/pressure.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<pressure_dimension,SI::system> pressure;
+typedef unit<pressure_dimension,si::system> pressure;
// windef.h #defines pascal on Metrowerks compilers
#if defined(__MWERKS__)
@@ -40,7 +40,7 @@
#endif
BOOST_UNITS_STATIC_CONSTANT(pascals,pressure);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/reluctance.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/reluctance.hpp (original)
+++ sandbox/units/boost/units/systems/si/reluctance.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,14 +18,14 @@
namespace units {
-namespace SI {
+namespace si {
/// reluctance : L^-2 M^-1 T^2 I^2
typedef derived_dimension<length_base_dimension,-2,mass_base_dimension,-1,time_base_dimension,2,current_base_dimension,2>::type reluctance_type;
-typedef unit<SI::reluctance_type,SI::system> reluctance;
+typedef unit<si::reluctance_type,si::system> reluctance;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/resistance.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/resistance.hpp (original)
+++ sandbox/units/boost/units/systems/si/resistance.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,17 +18,17 @@
namespace units {
-namespace SI {
+namespace si {
/// resistance : L^2 M T^-3 I^-2
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-2>::type resistance_type;
-typedef unit<SI::resistance_type,SI::system> resistance;
+typedef unit<si::resistance_type,si::system> resistance;
BOOST_UNITS_STATIC_CONSTANT(ohm,resistance);
BOOST_UNITS_STATIC_CONSTANT(ohms,resistance);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/resistivity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/resistivity.hpp (original)
+++ sandbox/units/boost/units/systems/si/resistivity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -18,14 +18,14 @@
namespace units {
-namespace SI {
+namespace si {
/// resistivity : L^3 M T^-3 I^-2
typedef derived_dimension<length_base_dimension,3,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-2>::type resistivity_type;
-typedef unit<SI::resistivity_type,SI::system> resistivity;
+typedef unit<si::resistivity_type,si::system> resistivity;
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/solid_angle.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/solid_angle.hpp (original)
+++ sandbox/units/boost/units/systems/si/solid_angle.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<solid_angle_dimension,SI::system> solid_angle;
+typedef unit<solid_angle_dimension,si::system> solid_angle;
BOOST_UNITS_STATIC_CONSTANT(steradian,solid_angle);
BOOST_UNITS_STATIC_CONSTANT(steradians,solid_angle);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/surface_density.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/surface_density.hpp (original)
+++ sandbox/units/boost/units/systems/si/surface_density.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_SURFACE_DENSITY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/surface_density.hpp>
+#include <boost/units/physical_dimensions/surface_density.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<surface_density_dimension,SI::system> surface_density;
+typedef unit<surface_density_dimension,si::system> surface_density;
BOOST_UNITS_STATIC_CONSTANT(kilogram_per_square_meter,surface_density);
BOOST_UNITS_STATIC_CONSTANT(kilograms_per_square_meter,surface_density);
BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_square_metre,surface_density);
BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_square_metre,surface_density);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/temperature.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/temperature.hpp (original)
+++ sandbox/units/boost/units/systems/si/temperature.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<temperature_dimension,SI::system> temperature;
+typedef unit<temperature_dimension,si::system> temperature;
BOOST_UNITS_STATIC_CONSTANT(kelvin,temperature);
BOOST_UNITS_STATIC_CONSTANT(kelvins,temperature);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/time.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/time.hpp (original)
+++ sandbox/units/boost/units/systems/si/time.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -17,14 +17,14 @@
namespace units {
-namespace SI {
+namespace si {
-typedef unit<time_dimension,SI::system> time;
+typedef unit<time_dimension,si::system> time;
BOOST_UNITS_STATIC_CONSTANT(second,time);
BOOST_UNITS_STATIC_CONSTANT(seconds,time);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/velocity.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/velocity.hpp (original)
+++ sandbox/units/boost/units/systems/si/velocity.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_VELOCITY_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/velocity.hpp>
+#include <boost/units/physical_dimensions/velocity.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<velocity_dimension,SI::system> velocity;
+typedef unit<velocity_dimension,si::system> velocity;
BOOST_UNITS_STATIC_CONSTANT(meter_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(meters_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(metre_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(metres_per_second,velocity);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/volume.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/volume.hpp (original)
+++ sandbox/units/boost/units/systems/si/volume.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_VOLUME_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/volume.hpp>
+#include <boost/units/physical_dimensions/volume.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<volume_dimension,SI::system> volume;
+typedef unit<volume_dimension,si::system> volume;
BOOST_UNITS_STATIC_CONSTANT(cubic_meter,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_meters,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_metre,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_metres,volume);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/si/wavenumber.hpp
==============================================================================
--- sandbox/units/boost/units/systems/si/wavenumber.hpp (original)
+++ sandbox/units/boost/units/systems/si/wavenumber.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_WAVENUMBER_HPP
#include <boost/units/systems/si/base.hpp>
-#include <boost/units/systems/physical_dimensions/wavenumber.hpp>
+#include <boost/units/physical_dimensions/wavenumber.hpp>
namespace boost {
namespace units {
-namespace SI {
+namespace si {
-typedef unit<wavenumber_dimension,SI::system> wavenumber;
+typedef unit<wavenumber_dimension,si::system> wavenumber;
BOOST_UNITS_STATIC_CONSTANT(reciprocal_meter,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_meters,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_metre,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_metres,wavenumber);
-} // namespace SI
+} // namespace si
} // namespace units
Modified: sandbox/units/boost/units/systems/trig.hpp
==============================================================================
--- sandbox/units/boost/units/systems/trig.hpp (original)
+++ sandbox/units/boost/units/systems/trig.hpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -23,24 +23,24 @@
/// cos of theta in radians
template<class Y>
-typename dimensionless_quantity<SI::system,Y>::type
-cos(const quantity<SI::plane_angle,Y>& theta)
+typename dimensionless_quantity<si::system,Y>::type
+cos(const quantity<si::plane_angle,Y>& theta)
{
return std::cos(theta.value());
}
/// sin of theta in radians
template<class Y>
-typename dimensionless_quantity<SI::system,Y>::type
-sin(const quantity<SI::plane_angle,Y>& theta)
+typename dimensionless_quantity<si::system,Y>::type
+sin(const quantity<si::plane_angle,Y>& theta)
{
return std::sin(theta.value());
}
/// tan of theta in radians
template<class Y>
-typename dimensionless_quantity<SI::system,Y>::type
-tan(const quantity<SI::plane_angle,Y>& theta)
+typename dimensionless_quantity<si::system,Y>::type
+tan(const quantity<si::plane_angle,Y>& theta)
{
return std::tan(theta.value());
}
@@ -50,7 +50,7 @@
typename dimensionless_quantity<System,Y>::type
cos(const quantity<unit<plane_angle_dimension,System>,Y>& theta)
{
- return cos(quantity<SI::plane_angle,Y>(theta));
+ return cos(quantity<si::plane_angle,Y>(theta));
}
/// sin of theta in other angular units
@@ -58,7 +58,7 @@
typename dimensionless_quantity<System,Y>::type
sin(const quantity<unit<plane_angle_dimension,System>,Y>& theta)
{
- return sin(quantity<SI::plane_angle,Y>(theta));
+ return sin(quantity<si::plane_angle,Y>(theta));
}
/// tan of theta in other angular units
@@ -66,15 +66,15 @@
typename dimensionless_quantity<System,Y>::type
tan(const quantity<unit<plane_angle_dimension,System>,Y>& theta)
{
- return tan(quantity<SI::plane_angle,Y>(theta));
+ return tan(quantity<si::plane_angle,Y>(theta));
}
/// acos of @c value_type returning angle in radians
template<class Y>
-quantity<SI::plane_angle,Y>
+quantity<si::plane_angle,Y>
acos(const Y& val)
{
- return quantity<SI::plane_angle,Y>(std::acos(val)*SI::radians);
+ return quantity<si::plane_angle,Y>(std::acos(val)*si::radians);
}
/// acos of dimensionless quantity returning angle in same system
@@ -82,15 +82,15 @@
quantity<unit<plane_angle_dimension,System>,Y>
acos(const quantity<unit<dimensionless_type,System>,Y>& val)
{
- return quantity<unit<plane_angle_dimension,System>,Y>(std::acos(val)*SI::radians);
+ return quantity<unit<plane_angle_dimension,System>,Y>(std::acos(val)*si::radians);
}
/// asin of @c value_type returning angle in radians
template<class Y>
-quantity<SI::plane_angle,Y>
+quantity<si::plane_angle,Y>
asin(const Y& val)
{
- return quantity<SI::plane_angle,Y>(std::asin(val)*SI::radians);
+ return quantity<si::plane_angle,Y>(std::asin(val)*si::radians);
}
/// asin of dimensionless quantity returning angle in same system
@@ -98,15 +98,15 @@
quantity<unit<plane_angle_dimension,System>,Y>
asin(const quantity<unit<dimensionless_type,System>,Y>& val)
{
- return quantity<unit<plane_angle_dimension,System>,Y>(std::asin(val)*SI::radians);
+ return quantity<unit<plane_angle_dimension,System>,Y>(std::asin(val)*si::radians);
}
/// atan of @c value_type returning angle in radians
template<class Y>
-quantity<SI::plane_angle,Y>
+quantity<si::plane_angle,Y>
atan(const Y& val)
{
- return quantity<SI::plane_angle,Y>(std::atan(val)*SI::radians);
+ return quantity<si::plane_angle,Y>(std::atan(val)*si::radians);
}
/// atan of dimensionless quantity returning angle in same system
@@ -114,15 +114,15 @@
quantity<unit<plane_angle_dimension,System>,Y>
atan(const quantity<unit<dimensionless_type,System>,Y>& val)
{
- return quantity<unit<plane_angle_dimension,System>,Y>(std::atan(val)*SI::radians);
+ return quantity<unit<plane_angle_dimension,System>,Y>(std::atan(val)*si::radians);
}
/// atan2 of @c value_type returning angle in radians
template<class Y>
-quantity<SI::plane_angle,Y>
+quantity<si::plane_angle,Y>
atan2(const Y& y,const Y& x)
{
- return quantity<SI::plane_angle,Y>(std::atan2(y,x)*SI::radians);
+ return quantity<si::plane_angle,Y>(std::atan2(y,x)*si::radians);
}
} // namespace units
Modified: sandbox/units/libs/units/example/composite_output.cpp
==============================================================================
--- sandbox/units/libs/units/example/composite_output.cpp (original)
+++ sandbox/units/libs/units/example/composite_output.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -19,7 +19,7 @@
//[composite_output_snippet_1
-std::ostream& operator<<(std::ostream& os, const boost::units::SI::force&) {
+std::ostream& operator<<(std::ostream& os, const boost::units::si::force&) {
return(os << "N");
}
@@ -30,5 +30,5 @@
}
int main() {
- std::cout << 2.0 * boost::units::SI::newton << std::endl;
+ std::cout << 2.0 * boost::units::si::newton << std::endl;
}
Modified: sandbox/units/libs/units/example/conversion.cpp
==============================================================================
--- sandbox/units/libs/units/example/conversion.cpp (original)
+++ sandbox/units/libs/units/example/conversion.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -65,21 +65,21 @@
{
// implicit value_type conversions
//[conversion_snippet_1
- quantity<SI::length> L1 = quantity<SI::length,int>(int(2.5)*SI::meters);
- quantity<SI::length,int> L2(quantity<SI::length,double>(2.5*SI::meters));
+ quantity<si::length> L1 = quantity<si::length,int>(int(2.5)*si::meters);
+ quantity<si::length,int> L2(quantity<si::length,double>(2.5*si::meters));
//]
//[conversion_snippet_3
- quantity<SI::length,int> L3 = static_cast<quantity<SI::length,int> >(L1);
+ quantity<si::length,int> L3 = static_cast<quantity<si::length,int> >(L1);
//]
//[conversion_snippet_4
- quantity<CGS::length> L4 = static_cast<quantity<CGS::length> >(L1);
+ quantity<cgs::length> L4 = static_cast<quantity<cgs::length> >(L1);
//]
- quantity<SI::length,int> L5(4*SI::meters),
- L6(5*SI::meters);
- quantity<CGS::length> L7(L1);
+ quantity<si::length,int> L5(4*si::meters),
+ L6(5*si::meters);
+ quantity<cgs::length> L7(L1);
swap(L5,L6);
@@ -96,16 +96,16 @@
// test explicit unit system conversion
{
//[conversion_snippet_5
- quantity<SI::volume> vs(1.0*pow<3>(SI::meter));
- quantity<CGS::volume> vc(vs);
- quantity<SI::volume> vs2(vc);
+ quantity<si::volume> vs(1.0*pow<3>(si::meter));
+ quantity<cgs::volume> vc(vs);
+ quantity<si::volume> vs2(vc);
- quantity<SI::energy> es(1.0*SI::joule);
- quantity<CGS::energy> ec(es);
- quantity<SI::energy> es2(ec);
+ quantity<si::energy> es(1.0*si::joule);
+ quantity<cgs::energy> ec(es);
+ quantity<si::energy> es2(ec);
- quantity<SI::velocity> v1 = 2.0*SI::meters/SI::second,
- v2(2.0*CGS::centimeters/CGS::second);
+ quantity<si::velocity> v1 = 2.0*si::meters/si::second,
+ v2(2.0*cgs::centimeters/cgs::second);
//]
sstream1 << "volume (m^3) = " << vs << std::endl
Modified: sandbox/units/libs/units/example/conversion_factor.cpp
==============================================================================
--- sandbox/units/libs/units/example/conversion_factor.cpp (original)
+++ sandbox/units/libs/units/example/conversion_factor.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -51,23 +51,23 @@
//[conversion_factor_snippet_1
double dyne_to_newton =
- conversion_factor(CGS::dyne,SI::newton);
+ conversion_factor(cgs::dyne,si::newton);
std::cout << dyne_to_newton << std::endl;
double force_over_mass_conversion =
- conversion_factor(SI::newton/SI::kilogram,CGS::dyne/CGS::gram);
+ conversion_factor(si::newton/si::kilogram,cgs::dyne/cgs::gram);
std::cout << force_over_mass_conversion << std::endl;
double momentum_conversion =
- conversion_factor(CGS::momentum(),SI::momentum());
+ conversion_factor(cgs::momentum(),si::momentum());
std::cout << momentum_conversion << std::endl;
double momentum_over_mass_conversion =
- conversion_factor(SI::momentum()/SI::mass(),CGS::momentum()/CGS::gram);
+ conversion_factor(si::momentum()/si::mass(),cgs::momentum()/cgs::gram);
std::cout << momentum_over_mass_conversion << std::endl;
double acceleration_conversion =
- conversion_factor(CGS::gal,SI::meter_per_second_squared);
+ conversion_factor(cgs::gal,si::meter_per_second_squared);
std::cout << acceleration_conversion << std::endl;
//]
Modified: sandbox/units/libs/units/example/heterogeneous_unit.cpp
==============================================================================
--- sandbox/units/libs/units/example/heterogeneous_unit.cpp (original)
+++ sandbox/units/libs/units/example/heterogeneous_unit.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -59,8 +59,8 @@
std::stringstream sstream1, sstream2;
//[heterogeneous_unit_snippet_1
- quantity<SI::length> L(1.5*SI::meter);
- quantity<CGS::mass> M(1.0*CGS::gram);
+ quantity<si::length> L(1.5*si::meter);
+ quantity<cgs::mass> M(1.0*cgs::gram);
sstream1 << L << std::endl
<< M << std::endl
@@ -68,17 +68,17 @@
<< L/M << std::endl
<< std::endl;
- sstream1 << 1.0*SI::meter*SI::kilogram/pow<2>(SI::second) << std::endl
- << 1.0*SI::meter*SI::kilogram/pow<2>(SI::second)/SI::meter
+ sstream1 << 1.0*si::meter*si::kilogram/pow<2>(si::second) << std::endl
+ << 1.0*si::meter*si::kilogram/pow<2>(si::second)/si::meter
<< std::endl << std::endl;
- sstream1 << 1.0*CGS::centimeter*SI::kilogram/pow<2>(SI::second) << std::endl
- << 1.0*CGS::centimeter*SI::kilogram/pow<2>(SI::second)/SI::meter
+ sstream1 << 1.0*cgs::centimeter*si::kilogram/pow<2>(si::second) << std::endl
+ << 1.0*cgs::centimeter*si::kilogram/pow<2>(si::second)/si::meter
<< std::endl << std::endl;
//]
//heterogeneous_unit_snippet_2
- quantity<SI::area> A(1.5*SI::meter*CGS::centimeter);
+ quantity<si::area> A(1.5*si::meter*cgs::centimeter);
sstream1 << A << std::endl
<< std::endl;
Modified: sandbox/units/libs/units/example/kitchen_sink.cpp
==============================================================================
--- sandbox/units/libs/units/example/kitchen_sink.cpp (original)
+++ sandbox/units/libs/units/example/kitchen_sink.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -190,14 +190,14 @@
//]
//[kitchen_sink_function_snippet_4
-/// the ideal gas law in SI units
+/// the ideal gas law in si units
template<class Y>
-quantity<SI::amount,Y>
-idealGasLaw(const quantity<SI::pressure,Y>& P,
- const quantity<SI::volume,Y>& V,
- const quantity<SI::temperature,Y>& T)
+quantity<si::amount,Y>
+idealGasLaw(const quantity<si::pressure,Y>& P,
+ const quantity<si::volume,Y>& V,
+ const quantity<si::temperature,Y>& T)
{
- using namespace boost::units::SI;
+ using namespace boost::units::si;
#if BOOST_UNITS_HAS_TYPEOF
return (P*V/(constants::CODATA::R*T));
@@ -214,7 +214,7 @@
int main()
{
using namespace boost::units;
- using namespace boost::units::SI;
+ using namespace boost::units::si;
std::stringstream sstream1, sstream2;
Modified: sandbox/units/libs/units/example/non_base_dimension.cpp
==============================================================================
--- sandbox/units/libs/units/example/non_base_dimension.cpp (original)
+++ sandbox/units/libs/units/example/non_base_dimension.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -31,7 +31,7 @@
#include <boost/units/conversion.hpp>
#include <boost/units/unit.hpp>
#include <boost/units/quantity.hpp>
-#include <boost/units/systems/physical_dimensions.hpp>
+#include <boost/units/physical_dimensions.hpp>
#include <boost/units/base_unit.hpp>
#include <boost/units/make_system.hpp>
Modified: sandbox/units/libs/units/example/performance.cpp
==============================================================================
--- sandbox/units/libs/units/example/performance.cpp (original)
+++ sandbox/units/libs/units/example/performance.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -200,11 +200,11 @@
return(1.0 - x + 4.0 * y);
}
- boost::units::quantity<boost::units::SI::velocity>
- operator()(const quantity<SI::time>& x,
- const quantity<SI::length>& y) const {
+ boost::units::quantity<boost::units::si::velocity>
+ operator()(const quantity<si::time>& x,
+ const quantity<si::length>& y) const {
using namespace boost::units;
- using namespace SI;
+ using namespace si;
return(1.0 * meters / second -
x * meters / pow<2>(seconds) +
4.0 * y / seconds );
@@ -217,8 +217,8 @@
};
template<>
-struct f::result<quantity<SI::time>, quantity<SI::length> > {
- typedef quantity<SI::velocity> type;
+struct f::result<quantity<si::time>, quantity<si::length> > {
+ typedef quantity<si::velocity> type;
};
@@ -260,7 +260,7 @@
std::cout << timer.elapsed() << " seconds" << std::endl;
}
typedef boost::numeric::ublas::matrix<
- boost::units::quantity<boost::units::SI::dimensionless>
+ boost::units::quantity<boost::units::si::dimensionless>
> matrix_type;
matrix_type ublas_resultq;
{
@@ -301,19 +301,19 @@
std::cout << timer.elapsed() << " seconds" << std::endl;
}
std::vector<
- boost::units::quantity<boost::units::SI::energy>
+ boost::units::quantity<boost::units::si::energy>
> cresultq(max_value * max_value);
{
std::vector<
- boost::units::quantity<boost::units::SI::force>
+ boost::units::quantity<boost::units::si::force>
> m1(max_value * max_value);
std::vector<
- boost::units::quantity<boost::units::SI::length>
+ boost::units::quantity<boost::units::si::length>
> m2(max_value * max_value);
std::srand(1492);
for(int i = 0; i < max_value * max_value; ++i) {
- m1[i] = std::rand() * boost::units::SI::newtons;
- m2[i] = std::rand() * boost::units::SI::meters;
+ m1[i] = std::rand() * boost::units::si::newtons;
+ m2[i] = std::rand() * boost::units::si::meters;
}
std::cout << "tiled_matrix_multiply<quantity>("
<< max_value << ", " << max_value << ") : ";
@@ -364,12 +364,12 @@
}
{
using namespace boost::units;
- using namespace SI;
+ using namespace si;
std::vector<quantity<length> > values(1000);
std::cout << "solving y' = 1 - x + 4 * y with quantity: ";
boost::timer timer;
for(int i = 0; i < 1000; ++i) {
- quantity<SI::time> x = .1 * i * seconds;
+ quantity<si::time> x = .1 * i * seconds;
values[i] = solve_differential_equation(
f(),
0.0 * seconds,
@@ -380,7 +380,7 @@
std::cout << timer.elapsed() << " seconds" << std::endl;
for(int i = 0; i < 1000; ++i) {
double x = .1 * i;
- quantity<SI::length> value =
+ quantity<si::length> value =
(1.0/4.0 * x - 3.0/16.0 + 19.0/16.0 * std::exp(4 * x)) * meters;
if(abs(values[i] - value) > value / 1e9) {
std::cout << std::setprecision(15) << "i = : " << i
Modified: sandbox/units/libs/units/example/radar_beam_height.cpp
==============================================================================
--- sandbox/units/libs/units/example/radar_beam_height.cpp (original)
+++ sandbox/units/libs/units/example/radar_beam_height.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -65,14 +65,14 @@
} // namespace nautical
-// helper for conversions between nautical length and SI length
+// helper for conversions between nautical length and si length
} // namespace units
} // namespace boost
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::nautical::length_base_unit,
- boost::units::SI::meter_base_unit,
+ boost::units::si::meter_base_unit,
double, 1.852e3);
namespace boost {
@@ -104,7 +104,7 @@
} // namespace boost
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::length_base_unit,
- boost::units::SI::meter_base_unit,
+ boost::units::si::meter_base_unit,
double, 1.0/3.28083989501312);
namespace boost {
@@ -157,18 +157,18 @@
int main(void)
{
using namespace boost::units;
- using namespace boost::units::SI;
+ using namespace boost::units::si;
using namespace boost::units::nautical;
std::stringstream sstream1, sstream2;
//[radar_beam_height_snippet_1
const quantity<nautical::length> radar_range(300.0*miles);
- const quantity<SI::length> earth_radius(6371.0087714*kilo*meters);
+ const quantity<si::length> earth_radius(6371.0087714*kilo*meters);
- const quantity<SI::length> beam_height_1(radar_beam_height(quantity<SI::length>(radar_range),earth_radius));
+ const quantity<si::length> beam_height_1(radar_beam_height(quantity<si::length>(radar_range),earth_radius));
const quantity<nautical::length> beam_height_2(radar_beam_height(radar_range,quantity<nautical::length>(earth_radius)));
- const quantity<SI::length> beam_height_3(radar_beam_height< quantity<SI::length> >(radar_range,earth_radius));
+ const quantity<si::length> beam_height_3(radar_beam_height< quantity<si::length> >(radar_range,earth_radius));
const quantity<nautical::length> beam_height_4(radar_beam_height< quantity<nautical::length> >(radar_range,earth_radius));
//]
@@ -181,7 +181,7 @@
<< "beam height approx : " << radar_beam_height(radar_range)
<< std::endl
<< "beam height approx : "
- << quantity<SI::length>(radar_beam_height(radar_range))
+ << quantity<si::length>(radar_beam_height(radar_range))
<< std::endl << std::endl;
sstream2 << "radar range : 300 nmi" << std::endl;
Modified: sandbox/units/libs/units/example/runtime_unit.cpp
==============================================================================
--- sandbox/units/libs/units/example/runtime_unit.cpp (original)
+++ sandbox/units/libs/units/example/runtime_unit.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -14,8 +14,7 @@
#include <boost/units/quantity.hpp>
#include <boost/units/cmath.hpp>
#include <boost/units/systems/si/length.hpp>
-#include <boost/units/systems/base_units.hpp>
-#include <boost/units/systems/imperial/base_units/foot.hpp>
+#include <boost/units/base_units/imperial/foot.hpp>
//[runtime_unit_snippet_1
@@ -24,19 +23,19 @@
using namespace boost::units;
using imperial::foot_base_unit;
-std::map<std::string, quantity<SI::length> > known_units;
+std::map<std::string, quantity<si::length> > known_units;
}
-quantity<SI::length> calculate(const quantity<SI::length>& t) {
- return(boost::units::hypot(t, 2.0 * SI::meters));
+quantity<si::length> calculate(const quantity<si::length>& t) {
+ return(boost::units::hypot(t, 2.0 * si::meters));
}
int main() {
- known_units["meter"] = 1.0 * SI::meters;
- known_units["centimeter"] = .01 * SI::meters;;
+ known_units["meter"] = 1.0 * si::meters;
+ known_units["centimeter"] = .01 * si::meters;;
known_units["foot"] =
- conversion_factor(foot_base_unit::unit_type(), SI::meter) * SI::meter;
+ conversion_factor(foot_base_unit::unit_type(), si::meter) * si::meter;
std::string output_type("meter");
std::string input;
while((std::cout << ">") && (std::cin >> input)) {
Modified: sandbox/units/libs/units/example/systems.cpp
==============================================================================
--- sandbox/units/libs/units/example/systems.cpp (original)
+++ sandbox/units/libs/units/example/systems.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -14,7 +14,7 @@
\brief systems.cpp
\detailed
-Test various non-SI units
+Test various non-si units
Output:
@verbatim
@@ -26,76 +26,6 @@
@endverbatim
**/
-#include <iostream>
-#include <sstream>
-#include <algorithm>
-
-#include <boost/units/conversion.hpp>
-#include <boost/units/io.hpp>
-#include <boost/units/pow.hpp>
-
-#include <boost/units/systems/si.hpp>
-
-#include <boost/units/systems/angle/base_units/arcminute.hpp>
-#include <boost/units/systems/angle/base_units/arcsecond.hpp>
-#include <boost/units/systems/angle/base_units/degree.hpp>
-#include <boost/units/systems/angle/base_units/gradian.hpp>
-#include <boost/units/systems/angle/base_units/revolution.hpp>
-#include <boost/units/systems/angle/base_units/radian.hpp>
-#include <boost/units/systems/angle/base_units/steradian.hpp>
-
-#include <boost/units/systems/astronomical/base_units/astronomical_unit.hpp>
-#include <boost/units/systems/astronomical/base_units/light_second.hpp>
-#include <boost/units/systems/astronomical/base_units/light_minute.hpp>
-#include <boost/units/systems/astronomical/base_units/light_hour.hpp>
-#include <boost/units/systems/astronomical/base_units/light_day.hpp>
-#include <boost/units/systems/astronomical/base_units/light_year.hpp>
-#include <boost/units/systems/astronomical/base_units/parsec.hpp>
-
-#include <boost/units/systems/imperial/base_units/thou.hpp>
-#include <boost/units/systems/imperial/base_units/inch.hpp>
-#include <boost/units/systems/imperial/base_units/foot.hpp>
-#include <boost/units/systems/imperial/base_units/yard.hpp>
-#include <boost/units/systems/imperial/base_units/furlong.hpp>
-#include <boost/units/systems/imperial/base_units/mile.hpp>
-#include <boost/units/systems/imperial/base_units/league.hpp>
-
-#include <boost/units/systems/imperial/base_units/grain.hpp>
-#include <boost/units/systems/imperial/base_units/drachm.hpp>
-#include <boost/units/systems/imperial/base_units/ounce.hpp>
-#include <boost/units/systems/imperial/base_units/pound.hpp>
-#include <boost/units/systems/imperial/base_units/stone.hpp>
-#include <boost/units/systems/imperial/base_units/quarter.hpp>
-#include <boost/units/systems/imperial/base_units/hundredweight.hpp>
-#include <boost/units/systems/imperial/base_units/ton.hpp>
-
-#include <boost/units/systems/imperial/base_units/fluid_ounce.hpp>
-#include <boost/units/systems/imperial/base_units/gill.hpp>
-#include <boost/units/systems/imperial/base_units/pint.hpp>
-#include <boost/units/systems/imperial/base_units/quart.hpp>
-#include <boost/units/systems/imperial/base_units/gallon.hpp>
-
-#include <boost/units/systems/metric/base_units/angstrom.hpp>
-#include <boost/units/systems/metric/base_units/fermi.hpp>
-#include <boost/units/systems/metric/base_units/micron.hpp>
-
-#include <boost/units/systems/metric/base_units/ton.hpp>
-
-#include <boost/units/systems/metric/base_units/day.hpp>
-#include <boost/units/systems/metric/base_units/hour.hpp>
-#include <boost/units/systems/metric/base_units/minute.hpp>
-#include <boost/units/systems/metric/base_units/year.hpp>
-
-#include <boost/units/systems/metric/base_units/are.hpp>
-#include <boost/units/systems/metric/base_units/barn.hpp>
-#include <boost/units/systems/metric/base_units/hectare.hpp>
-
-#include <boost/units/systems/metric/base_units/liter.hpp>
-
-#include <boost/units/systems/metric/base_units/atmosphere.hpp>
-#include <boost/units/systems/metric/base_units/bar.hpp>
-#include <boost/units/systems/metric/base_units/torr.hpp>
-
#define BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(namespace_,unit_name_,dimension_) \
namespace boost { \
namespace units { \
@@ -107,6 +37,26 @@
} \
} \
+#include <iostream>
+#include <sstream>
+#include <algorithm>
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/io.hpp>
+#include <boost/units/pow.hpp>
+
+#include <boost/units/systems/cgs.hpp>
+#include <boost/units/systems/si.hpp>
+
+// angle base units
+#include <boost/units/base_units/angle/arcminute.hpp>
+#include <boost/units/base_units/angle/arcsecond.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+#include <boost/units/base_units/angle/gradian.hpp>
+#include <boost/units/base_units/angle/revolution.hpp>
+#include <boost/units/base_units/angle/radian.hpp>
+#include <boost/units/base_units/angle/steradian.hpp>
+
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(angle,arcminute,plane_angle)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(angle,arcsecond,plane_angle)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(angle,degree,plane_angle)
@@ -116,6 +66,15 @@
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(angle,steradian,solid_angle)
+// astronomical base units
+#include <boost/units/base_units/astronomical/astronomical_unit.hpp>
+#include <boost/units/base_units/astronomical/light_second.hpp>
+#include <boost/units/base_units/astronomical/light_minute.hpp>
+#include <boost/units/base_units/astronomical/light_hour.hpp>
+#include <boost/units/base_units/astronomical/light_day.hpp>
+#include <boost/units/base_units/astronomical/light_year.hpp>
+#include <boost/units/base_units/astronomical/parsec.hpp>
+
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(astronomical,astronomical_unit,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(astronomical,light_second,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(astronomical,light_minute,length)
@@ -124,6 +83,32 @@
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(astronomical,light_year,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(astronomical,parsec,length)
+// imperial base units
+#include <boost/units/base_units/imperial/thou.hpp>
+#include <boost/units/base_units/imperial/inch.hpp>
+#include <boost/units/base_units/imperial/foot.hpp>
+#include <boost/units/base_units/imperial/yard.hpp>
+#include <boost/units/base_units/imperial/furlong.hpp>
+#include <boost/units/base_units/imperial/mile.hpp>
+#include <boost/units/base_units/imperial/league.hpp>
+
+#include <boost/units/base_units/imperial/grain.hpp>
+#include <boost/units/base_units/imperial/drachm.hpp>
+#include <boost/units/base_units/imperial/ounce.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+#include <boost/units/base_units/imperial/stone.hpp>
+#include <boost/units/base_units/imperial/quarter.hpp>
+#include <boost/units/base_units/imperial/hundredweight.hpp>
+#include <boost/units/base_units/imperial/ton.hpp>
+
+#include <boost/units/base_units/imperial/fluid_ounce.hpp>
+#include <boost/units/base_units/imperial/gill.hpp>
+#include <boost/units/base_units/imperial/pint.hpp>
+#include <boost/units/base_units/imperial/quart.hpp>
+#include <boost/units/base_units/imperial/gallon.hpp>
+
+#include <boost/units/base_units/imperial/conversions.hpp>
+
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(imperial,thou,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(imperial,inch,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(imperial,foot,length)
@@ -147,9 +132,36 @@
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(imperial,quart,volume)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(imperial,gallon,volume)
+// metric base units
+#include <boost/units/base_units/metric/angstrom.hpp>
+#include <boost/units/base_units/metric/fermi.hpp>
+#include <boost/units/base_units/metric/micron.hpp>
+#include <boost/units/base_units/metric/nautical_mile.hpp>
+
+#include <boost/units/base_units/metric/ton.hpp>
+
+#include <boost/units/base_units/metric/day.hpp>
+#include <boost/units/base_units/metric/hour.hpp>
+#include <boost/units/base_units/metric/minute.hpp>
+#include <boost/units/base_units/metric/year.hpp>
+
+#include <boost/units/base_units/metric/knot.hpp>
+
+#include <boost/units/base_units/metric/are.hpp>
+#include <boost/units/base_units/metric/barn.hpp>
+#include <boost/units/base_units/metric/hectare.hpp>
+
+#include <boost/units/base_units/metric/liter.hpp>
+
+#include <boost/units/base_units/metric/atmosphere.hpp>
+#include <boost/units/base_units/metric/bar.hpp>
+#include <boost/units/base_units/metric/mmHg.hpp>
+#include <boost/units/base_units/metric/torr.hpp>
+
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,angstrom,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,fermi,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,micron,length)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,nautical_mile,length)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,ton,mass)
@@ -158,6 +170,8 @@
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,minute,time)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,year,time)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,knot,velocity)
+
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,are,area)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,barn,area)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,hectare,area)
@@ -166,8 +180,89 @@
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,atmosphere,pressure)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,bar,pressure)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,mmHg,pressure)
BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(metric,torr,pressure)
+// us base units
+
+#include <boost/units/base_units/us/mil.hpp>
+#include <boost/units/base_units/us/inch.hpp>
+#include <boost/units/base_units/us/foot.hpp>
+#include <boost/units/base_units/us/yard.hpp>
+#include <boost/units/base_units/us/mile.hpp>
+
+#include <boost/units/base_units/us/grain.hpp>
+#include <boost/units/base_units/us/dram.hpp>
+#include <boost/units/base_units/us/ounce.hpp>
+#include <boost/units/base_units/us/pound.hpp>
+#include <boost/units/base_units/us/hundredweight.hpp>
+#include <boost/units/base_units/us/ton.hpp>
+
+#include <boost/units/base_units/us/minim.hpp>
+#include <boost/units/base_units/us/fluid_dram.hpp>
+#include <boost/units/base_units/us/teaspoon.hpp>
+#include <boost/units/base_units/us/tablespoon.hpp>
+#include <boost/units/base_units/us/fluid_ounce.hpp>
+#include <boost/units/base_units/us/gill.hpp>
+#include <boost/units/base_units/us/cup.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+#include <boost/units/base_units/us/quart.hpp>
+#include <boost/units/base_units/us/gallon.hpp>
+
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,mil,length)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,inch,length)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,foot,length)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,yard,length)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,mile,length)
+
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,grain,mass)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,dram,mass)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,ounce,mass)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,pound,mass)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,hundredweight,mass)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,ton,mass)
+
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,minim,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,fluid_dram,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,teaspoon,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,tablespoon,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,fluid_ounce,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,gill,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,cup,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,pint,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,quart,volume)
+BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(us,gallon,volume)
+
+#ifdef __GNUC__
+#include <cxxabi.h>
+#endif
+
+inline std::string demangle(const char* name)
+{
+ #ifdef __GNUC__
+ // need to demangle C++ symbols
+ char* realname;
+ std::size_t len;
+ int stat;
+
+ realname = abi::__cxa_demangle(name,NULL,&len,&stat);
+
+ if (realname != NULL)
+ {
+ const std::string out(realname);
+ free(realname);
+
+ return out;
+ }
+
+ return std::string("demangle :: error - unable to demangle specified symbol");
+ #else
+ return name;
+ #endif
+}
+
+// MCS I believe all the commented code should work, but there is a problem for unit conversions when scale exponent is non-unit
+
int main(void)
{
using namespace boost::units;
@@ -175,76 +270,151 @@
{
using namespace boost::units::angle;
- quantity<arcminute_plane_angle> an1(1.0*arcminutes);
- quantity<arcsecond_plane_angle> an2(1.0*arcseconds);
- quantity<degree_plane_angle> an3(1.0*degrees);
- quantity<gradian_plane_angle> an4(1.0*gradians);
- quantity<radian_plane_angle> an5(1.0*radians);
- quantity<revolution_plane_angle> an6(1.0*revolutions);
-
- std::cout << an1 << std::endl
- << an2 << std::endl
- << an3 << std::endl
- << an4 << std::endl
- << an5 << std::endl
- << an6 << std::endl
- << quantity<SI::dimensionless>(an6/an1) << std::endl
- << quantity<SI::dimensionless>(an6/an2) << std::endl
- << quantity<SI::dimensionless>(an6/an3) << std::endl
- << quantity<SI::dimensionless>(an6/an4) << std::endl
- << quantity<SI::dimensionless>(an6/an5) << std::endl
- << quantity<SI::plane_angle>(an1) << std::endl
- << quantity<SI::plane_angle>(an2) << std::endl
- << quantity<SI::plane_angle>(an3) << std::endl
- << quantity<SI::plane_angle>(an4) << std::endl
- << quantity<SI::plane_angle>(an5) << std::endl
- << quantity<SI::plane_angle>(an6) << std::endl
+ std::cout << "Testing angle base units..." << std::endl;
+
+ quantity<arcsecond_plane_angle> as(1.0*arcseconds);
+ quantity<arcminute_plane_angle> am(1.0*arcminutes);
+ quantity<degree_plane_angle> d(1.0*degrees);
+ quantity<gradian_plane_angle> g(1.0*gradians);
+ quantity<radian_plane_angle> r(1.0*radians);
+ quantity<revolution_plane_angle> rev(1.0*revolutions);
+
+ std::cout << as << std::endl
+ << am << std::endl
+ << d << std::endl
+ << g << std::endl
+ << r << std::endl
+ << rev << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(rev/as) << std::endl
+ << quantity<si::dimensionless>(rev/am) << std::endl
+ << quantity<si::dimensionless>(rev/d) << std::endl
+ << quantity<si::dimensionless>(rev/g) << std::endl
+ << quantity<si::dimensionless>(rev/r) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::plane_angle>(as) << std::endl
+ << quantity<si::plane_angle>(am) << std::endl
+ << quantity<si::plane_angle>(d) << std::endl
+ << quantity<si::plane_angle>(g) << std::endl
+ << quantity<si::plane_angle>(r) << std::endl
+ << quantity<si::plane_angle>(rev) << std::endl
+ << std::endl;
+
+ // conversions only work with exponent of +/- 1 in scaled_base_unit?
+ std::cout << quantity<arcsecond_plane_angle>(as) << std::endl
+ << quantity<arcsecond_plane_angle>(am) << std::endl
+ << quantity<arcsecond_plane_angle>(d) << std::endl
+ << quantity<arcsecond_plane_angle>(rev) << std::endl
+ << std::endl;
+
+ // conversions only work with exponent of +/- 1 in scaled_base_unit? see arcsecond.hpp
+ std::cout << quantity<arcminute_plane_angle>(as) << std::endl
+ << quantity<arcminute_plane_angle>(am) << std::endl
+ << quantity<arcminute_plane_angle>(d) << std::endl
+ << quantity<arcminute_plane_angle>(rev) << std::endl
+ << std::endl;
+
+ std::cout << quantity<degree_plane_angle>(as) << std::endl
+ << quantity<degree_plane_angle>(am) << std::endl
+ << quantity<degree_plane_angle>(d) << std::endl
+ << quantity<degree_plane_angle>(rev) << std::endl
+ << std::endl;
+
+ std::cout << quantity<revolution_plane_angle>(as) << std::endl
+ << quantity<revolution_plane_angle>(am) << std::endl
+ << quantity<revolution_plane_angle>(d) << std::endl
+ << quantity<revolution_plane_angle>(rev) << std::endl
<< std::endl;
quantity<steradian_solid_angle> sa1(1.0*steradians);
std::cout << sa1 << std::endl
- << quantity<SI::solid_angle>(sa1) << std::endl
+ << quantity<si::solid_angle>(sa1) << std::endl
<< std::endl;
}
{
using namespace boost::units::astronomical;
- quantity<astronomical_unit_length> au(1.0*astronomical_units);
+ std::cout << "Testing astronomical base units..." << std::endl;
+
quantity<light_second_length> ls(1.0*light_seconds);
quantity<light_minute_length> lm(1.0*light_minutes);
+ quantity<astronomical_unit_length> au(1.0*astronomical_units);
quantity<light_hour_length> lh(1.0*light_hours);
quantity<light_day_length> ld(1.0*light_days);
quantity<light_year_length> ly(1.0*light_years);
quantity<parsec_length> ps(1.0*parsecs);
- std::cout << au << std::endl
- << ls << std::endl
+ std::cout << ls << std::endl
<< lm << std::endl
+ << au << std::endl
<< lh << std::endl
<< ld << std::endl
<< ly << std::endl
<< ps << std::endl
- << quantity<SI::dimensionless>(ly/au) << std::endl
- << quantity<SI::dimensionless>(ly/ls) << std::endl
- << quantity<SI::dimensionless>(ly/lm) << std::endl
- << quantity<SI::dimensionless>(ly/ld) << std::endl
- << quantity<SI::dimensionless>(ly/lh) << std::endl
- << quantity<SI::dimensionless>(ly/ps) << std::endl
- << quantity<SI::length>(au) << std::endl
- << quantity<SI::length>(ls) << std::endl
- << quantity<SI::length>(lm) << std::endl
- << quantity<SI::length>(lh) << std::endl
- << quantity<SI::length>(ld) << std::endl
- << quantity<SI::length>(ly) << std::endl
- << quantity<SI::length>(ps) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(ly/ls) << std::endl
+ << quantity<si::dimensionless>(ly/lm) << std::endl
+ << quantity<si::dimensionless>(ly/au) << std::endl
+ << quantity<si::dimensionless>(ly/ld) << std::endl
+ << quantity<si::dimensionless>(ly/lh) << std::endl
+ << quantity<si::dimensionless>(ly/ps) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::length>(ls) << std::endl
+ << quantity<si::length>(lm) << std::endl
+ << quantity<si::length>(au) << std::endl
+ << quantity<si::length>(lh) << std::endl
+ << quantity<si::length>(ld) << std::endl
+ << quantity<si::length>(ly) << std::endl
+ << quantity<si::length>(ps) << std::endl
+ << std::endl;
+
+ std::cout << quantity<light_second_length>(ls) << std::endl
+ << quantity<light_second_length>(lm) << std::endl
+ << quantity<light_second_length>(lh) << std::endl
+ << quantity<light_second_length>(ld) << std::endl
+ << quantity<light_second_length>(ly) << std::endl
+ << std::endl;
+
+ std::cout << quantity<light_minute_length>(ls) << std::endl
+ << quantity<light_minute_length>(lm) << std::endl
+ << quantity<light_minute_length>(lh) << std::endl
+ << quantity<light_minute_length>(ld) << std::endl
+ << quantity<light_minute_length>(ly) << std::endl
+ << std::endl;
+
+ std::cout << quantity<light_hour_length>(ls) << std::endl
+ << quantity<light_hour_length>(lm) << std::endl
+ << quantity<light_hour_length>(lh) << std::endl
+ << quantity<light_hour_length>(ld) << std::endl
+ << quantity<light_hour_length>(ly) << std::endl
+ << std::endl;
+
+ std::cout << quantity<light_day_length>(ls) << std::endl
+ << quantity<light_day_length>(lm) << std::endl
+ << quantity<light_day_length>(lh) << std::endl
+ << quantity<light_day_length>(ld) << std::endl
+ << quantity<light_day_length>(ly) << std::endl
+ << std::endl;
+
+ std::cout << quantity<light_year_length>(ls) << std::endl
+ << quantity<light_year_length>(lm) << std::endl
+ << quantity<light_year_length>(ld) << std::endl
+ << quantity<light_year_length>(lh) << std::endl
+ << quantity<light_year_length>(ly) << std::endl
<< std::endl;
}
{
using namespace boost::units::imperial;
+ std::cout << "Testing imperial base units..." << std::endl;
+
quantity<thou_length> iml1(1.0*thous);
quantity<inch_length> iml2(1.0*inchs);
quantity<foot_length> iml3(1.0*foots);
@@ -260,21 +430,88 @@
<< iml5 << std::endl
<< iml6 << std::endl
<< iml7 << std::endl
- << quantity<SI::dimensionless>(iml7/iml1) << std::endl
- << quantity<SI::dimensionless>(iml7/iml2) << std::endl
- << quantity<SI::dimensionless>(iml7/iml3) << std::endl
- << quantity<SI::dimensionless>(iml7/iml4) << std::endl
- << quantity<SI::dimensionless>(iml7/iml5) << std::endl
- << quantity<SI::dimensionless>(iml7/iml6) << std::endl
- << quantity<SI::length>(iml1) << std::endl
- << quantity<SI::length>(iml2) << std::endl
- << quantity<SI::length>(iml3) << std::endl
- << quantity<SI::length>(iml4) << std::endl
- << quantity<SI::length>(iml5) << std::endl
- << quantity<SI::length>(iml6) << std::endl
- << quantity<SI::length>(iml7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(iml7/iml1) << std::endl
+ << quantity<si::dimensionless>(iml7/iml2) << std::endl
+ << quantity<si::dimensionless>(iml7/iml3) << std::endl
+ << quantity<si::dimensionless>(iml7/iml4) << std::endl
+ << quantity<si::dimensionless>(iml7/iml5) << std::endl
+ << quantity<si::dimensionless>(iml7/iml6) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::length>(iml1) << std::endl
+ << quantity<si::length>(iml2) << std::endl
+ << quantity<si::length>(iml3) << std::endl
+ << quantity<si::length>(iml4) << std::endl
+ << quantity<si::length>(iml5) << std::endl
+ << quantity<si::length>(iml6) << std::endl
+ << quantity<si::length>(iml7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<thou_length>(iml1) << std::endl
+ << quantity<thou_length>(iml2) << std::endl
+ << quantity<thou_length>(iml3) << std::endl
+ << quantity<thou_length>(iml4) << std::endl
+ << quantity<thou_length>(iml5) << std::endl
+ << quantity<thou_length>(iml6) << std::endl
+ << quantity<thou_length>(iml7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<inch_length>(iml1) << std::endl
+ << quantity<inch_length>(iml2) << std::endl
+ << quantity<inch_length>(iml3) << std::endl
+ << quantity<inch_length>(iml4) << std::endl
+ << quantity<inch_length>(iml5) << std::endl
+ << quantity<inch_length>(iml6) << std::endl
+ << quantity<inch_length>(iml7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<foot_length>(iml1) << std::endl
+ << quantity<foot_length>(iml2) << std::endl
+ << quantity<foot_length>(iml3) << std::endl
+ << quantity<foot_length>(iml4) << std::endl
+ << quantity<foot_length>(iml5) << std::endl
+ << quantity<foot_length>(iml6) << std::endl
+ << quantity<foot_length>(iml7) << std::endl
<< std::endl;
+ std::cout << quantity<yard_length>(iml1) << std::endl
+ << quantity<yard_length>(iml2) << std::endl
+ << quantity<yard_length>(iml3) << std::endl
+ << quantity<yard_length>(iml4) << std::endl
+ << quantity<yard_length>(iml5) << std::endl
+ << quantity<yard_length>(iml6) << std::endl
+ << quantity<yard_length>(iml7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<furlong_length>(iml1) << std::endl
+ << quantity<furlong_length>(iml2) << std::endl
+ << quantity<furlong_length>(iml3) << std::endl
+ << quantity<furlong_length>(iml4) << std::endl
+ << quantity<furlong_length>(iml5) << std::endl
+ << quantity<furlong_length>(iml6) << std::endl
+ << quantity<furlong_length>(iml7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<mile_length>(iml1) << std::endl
+ << quantity<mile_length>(iml2) << std::endl
+ << quantity<mile_length>(iml3) << std::endl
+ << quantity<mile_length>(iml4) << std::endl
+ << quantity<mile_length>(iml5) << std::endl
+ << quantity<mile_length>(iml6) << std::endl
+ << quantity<mile_length>(iml7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<league_length>(iml1) << std::endl
+ << quantity<league_length>(iml2) << std::endl
+ << quantity<league_length>(iml3) << std::endl
+ << quantity<league_length>(iml4) << std::endl
+ << quantity<league_length>(iml5) << std::endl
+ << quantity<league_length>(iml6) << std::endl
+ << quantity<league_length>(iml7) << std::endl
+ << std::endl;
+
quantity<grain_mass> imm1(1.0*grains);
quantity<drachm_mass> imm2(1.0*drachms);
quantity<ounce_mass> imm3(1.0*ounces);
@@ -292,99 +529,674 @@
<< imm6 << std::endl
<< imm7 << std::endl
<< imm8 << std::endl
- << quantity<SI::dimensionless>(imm8/imm1) << std::endl
- << quantity<SI::dimensionless>(imm8/imm2) << std::endl
- << quantity<SI::dimensionless>(imm8/imm3) << std::endl
- << quantity<SI::dimensionless>(imm8/imm4) << std::endl
- << quantity<SI::dimensionless>(imm8/imm5) << std::endl
- << quantity<SI::dimensionless>(imm8/imm6) << std::endl
- << quantity<SI::dimensionless>(imm8/imm7) << std::endl
- << quantity<SI::mass>(imm1) << std::endl
- << quantity<SI::mass>(imm2) << std::endl
- << quantity<SI::mass>(imm3) << std::endl
- << quantity<SI::mass>(imm4) << std::endl
- << quantity<SI::mass>(imm5) << std::endl
- << quantity<SI::mass>(imm6) << std::endl
- << quantity<SI::mass>(imm7) << std::endl
- << quantity<SI::mass>(imm8) << std::endl
- << std::endl;
-
- quantity<gallon_volume> imv1(1.0*gallons);
- quantity<fluid_ounce_volume> imv2(1.0*fluid_ounces);
- quantity<gill_volume> imv3(1.0*gills);
- quantity<pint_volume> imv4(1.0*pints);
- quantity<quart_volume> imv5(1.0*quarts);
-
- //quantity<fluid_ounce_volume> im6 = 1.0*gallons; // why does this fail?
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(imm8/imm1) << std::endl
+ << quantity<si::dimensionless>(imm8/imm2) << std::endl
+ << quantity<si::dimensionless>(imm8/imm3) << std::endl
+ << quantity<si::dimensionless>(imm8/imm4) << std::endl
+ << quantity<si::dimensionless>(imm8/imm5) << std::endl
+ << quantity<si::dimensionless>(imm8/imm6) << std::endl
+ << quantity<si::dimensionless>(imm8/imm7) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::mass>(imm1) << std::endl
+ << quantity<si::mass>(imm2) << std::endl
+ << quantity<si::mass>(imm3) << std::endl
+ << quantity<si::mass>(imm4) << std::endl
+ << quantity<si::mass>(imm5) << std::endl
+ << quantity<si::mass>(imm6) << std::endl
+ << quantity<si::mass>(imm7) << std::endl
+ << quantity<si::mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<grain_mass>(imm1) << std::endl
+ << quantity<grain_mass>(imm2) << std::endl
+ << quantity<grain_mass>(imm3) << std::endl
+ << quantity<grain_mass>(imm4) << std::endl
+ << quantity<grain_mass>(imm5) << std::endl
+ << quantity<grain_mass>(imm6) << std::endl
+ << quantity<grain_mass>(imm7) << std::endl
+ << quantity<grain_mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<drachm_mass>(imm1) << std::endl
+ << quantity<drachm_mass>(imm2) << std::endl
+ << quantity<drachm_mass>(imm3) << std::endl
+ << quantity<drachm_mass>(imm4) << std::endl
+ << quantity<drachm_mass>(imm5) << std::endl
+ << quantity<drachm_mass>(imm6) << std::endl
+ << quantity<drachm_mass>(imm7) << std::endl
+ << quantity<drachm_mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<ounce_mass>(imm1) << std::endl
+ << quantity<ounce_mass>(imm2) << std::endl
+ << quantity<ounce_mass>(imm3) << std::endl
+ << quantity<ounce_mass>(imm4) << std::endl
+ << quantity<ounce_mass>(imm5) << std::endl
+ << quantity<ounce_mass>(imm6) << std::endl
+ << quantity<ounce_mass>(imm7) << std::endl
+ << quantity<ounce_mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<pound_mass>(imm1) << std::endl
+ << quantity<pound_mass>(imm2) << std::endl
+ << quantity<pound_mass>(imm3) << std::endl
+ << quantity<pound_mass>(imm4) << std::endl
+ << quantity<pound_mass>(imm5) << std::endl
+ << quantity<pound_mass>(imm6) << std::endl
+ << quantity<pound_mass>(imm7) << std::endl
+ << quantity<pound_mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<stone_mass>(imm1) << std::endl
+ << quantity<stone_mass>(imm2) << std::endl
+ << quantity<stone_mass>(imm3) << std::endl
+ << quantity<stone_mass>(imm4) << std::endl
+ << quantity<stone_mass>(imm5) << std::endl
+ << quantity<stone_mass>(imm6) << std::endl
+ << quantity<stone_mass>(imm7) << std::endl
+ << quantity<stone_mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<quarter_mass>(imm1) << std::endl
+ << quantity<quarter_mass>(imm2) << std::endl
+ << quantity<quarter_mass>(imm3) << std::endl
+ << quantity<quarter_mass>(imm4) << std::endl
+ << quantity<quarter_mass>(imm5) << std::endl
+ << quantity<quarter_mass>(imm6) << std::endl
+ << quantity<quarter_mass>(imm7) << std::endl
+ << quantity<quarter_mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<hundredweight_mass>(imm1) << std::endl
+ << quantity<hundredweight_mass>(imm2) << std::endl
+ << quantity<hundredweight_mass>(imm3) << std::endl
+ << quantity<hundredweight_mass>(imm4) << std::endl
+ << quantity<hundredweight_mass>(imm5) << std::endl
+ << quantity<hundredweight_mass>(imm6) << std::endl
+ << quantity<hundredweight_mass>(imm7) << std::endl
+ << quantity<hundredweight_mass>(imm8) << std::endl
+ << std::endl;
+
+ std::cout << quantity<ton_mass>(imm1) << std::endl
+ << quantity<ton_mass>(imm2) << std::endl
+ << quantity<ton_mass>(imm3) << std::endl
+ << quantity<ton_mass>(imm4) << std::endl
+ << quantity<ton_mass>(imm5) << std::endl
+ << quantity<ton_mass>(imm6) << std::endl
+ << quantity<ton_mass>(imm7) << std::endl
+ << quantity<ton_mass>(imm8) << std::endl
+ << std::endl;
+
+ quantity<fluid_ounce_volume> imv1(1.0*fluid_ounces);
+ quantity<gill_volume> imv2(1.0*gills);
+ quantity<pint_volume> imv3(1.0*pints);
+ quantity<quart_volume> imv4(1.0*quarts);
+ quantity<gallon_volume> imv5(1.0*gallons);
std::cout << imv1 << std::endl
<< imv2 << std::endl
<< imv3 << std::endl
<< imv4 << std::endl
<< imv5 << std::endl
- << quantity<SI::dimensionless>(imv1/imv2) << std::endl
- << quantity<SI::dimensionless>(imv1/imv3) << std::endl
- << quantity<SI::dimensionless>(imv1/imv4) << std::endl
- << quantity<SI::dimensionless>(imv1/imv5) << std::endl
- << quantity<SI::volume>(imv1) << std::endl
- << quantity<SI::volume>(imv2) << std::endl
- << quantity<SI::volume>(imv3) << std::endl
- << quantity<SI::volume>(imv4) << std::endl
- << quantity<SI::volume>(imv5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(imv5/imv1) << std::endl
+ << quantity<si::dimensionless>(imv5/imv2) << std::endl
+ << quantity<si::dimensionless>(imv5/imv3) << std::endl
+ << quantity<si::dimensionless>(imv5/imv4) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::volume>(imv1) << std::endl
+ << quantity<si::volume>(imv2) << std::endl
+ << quantity<si::volume>(imv3) << std::endl
+ << quantity<si::volume>(imv4) << std::endl
+ << quantity<si::volume>(imv5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<fluid_ounce_volume>(imv1) << std::endl
+ << quantity<fluid_ounce_volume>(imv2) << std::endl
+ << quantity<fluid_ounce_volume>(imv3) << std::endl
+ << quantity<fluid_ounce_volume>(imv4) << std::endl
+ << quantity<fluid_ounce_volume>(imv5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<gill_volume>(imv1) << std::endl
+ << quantity<gill_volume>(imv2) << std::endl
+ << quantity<gill_volume>(imv3) << std::endl
+ << quantity<gill_volume>(imv4) << std::endl
+ << quantity<gill_volume>(imv5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<pint_volume>(imv1) << std::endl
+ << quantity<pint_volume>(imv2) << std::endl
+ << quantity<pint_volume>(imv3) << std::endl
+ << quantity<pint_volume>(imv4) << std::endl
+ << quantity<pint_volume>(imv5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<quart_volume>(imv1) << std::endl
+ << quantity<quart_volume>(imv2) << std::endl
+ << quantity<quart_volume>(imv3) << std::endl
+ << quantity<quart_volume>(imv4) << std::endl
+ << quantity<quart_volume>(imv5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<gallon_volume>(imv1) << std::endl
+ << quantity<gallon_volume>(imv2) << std::endl
+ << quantity<gallon_volume>(imv3) << std::endl
+ << quantity<gallon_volume>(imv4) << std::endl
+ << quantity<gallon_volume>(imv5) << std::endl
<< std::endl;
}
{
using namespace boost::units::metric;
- quantity<angstrom_length> ml1(1.0*angstroms);
- quantity<fermi_length> ml2(1.0*fermis);
- quantity<micron_length> ml3(1.0*microns);
+ std::cout << "Testing metric base units..." << std::endl;
+
+ quantity<fermi_length> ml1(1.0*fermis);
+ quantity<angstrom_length> ml2(1.0*angstroms);
+ quantity<micron_length> ml3(1.0*microns);
+ quantity<nautical_mile_length> ml4(1.0*nautical_miles);
std::cout << ml1 << std::endl
<< ml2 << std::endl
<< ml3 << std::endl
- << quantity<SI::dimensionless>(ml3/ml1) << std::endl
- << quantity<SI::dimensionless>(ml3/ml2) << std::endl
- << quantity<SI::length>(ml1) << std::endl
- << quantity<SI::length>(ml2) << std::endl
- << quantity<SI::length>(ml3) << std::endl
+ << ml4 << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(ml4/ml1) << std::endl
+ << quantity<si::dimensionless>(ml4/ml2) << std::endl
+ << quantity<si::dimensionless>(ml4/ml3) << std::endl
<< std::endl;
-// probably more gram/kilogram business
-// quantity<ton_mass> mm1(1.0*tons);
-//
-// std::cout << mm1 << std::endl
-// << quantity<SI::mass>(mm1) << std::endl
+ std::cout << quantity<si::length>(ml1) << std::endl
+ << quantity<si::length>(ml2) << std::endl
+ << quantity<si::length>(ml3) << std::endl
+ << quantity<si::length>(ml4) << std::endl
+ << std::endl;
+
+// std::cout << quantity<fermi_length>(ml1) << std::endl
+// << quantity<fermi_length>(ml2) << std::endl
+// << quantity<fermi_length>(ml3) << std::endl
+// << quantity<fermi_length>(ml4) << std::endl
+// << std::endl;
+
+// std::cout << quantity<angstrom_length>(ml1) << std::endl
+// << quantity<angstrom_length>(ml2) << std::endl
+// << quantity<angstrom_length>(ml3) << std::endl
+// << quantity<angstrom_length>(ml4) << std::endl
// << std::endl;
+
+// std::cout << quantity<micron_length>(ml1) << std::endl
+// << quantity<micron_length>(ml2) << std::endl
+// << quantity<micron_length>(ml3) << std::endl
+// << quantity<micron_length>(ml4) << std::endl
+// << std::endl;
+
+ std::cout << quantity<nautical_mile_length>(ml1) << std::endl
+ << quantity<nautical_mile_length>(ml2) << std::endl
+ << quantity<nautical_mile_length>(ml3) << std::endl
+ << quantity<nautical_mile_length>(ml4) << std::endl
+ << std::endl;
+
+ quantity<ton_mass> mm1(1.0*tons);
+
+ std::cout << mm1 << std::endl
+ //<< quantity<si::mass>(mm1) << std::endl // this should work...
+ << quantity<cgs::mass>(mm1) << std::endl
+ << std::endl;
- quantity<day_time> mt1(1.0*days);
+ quantity<minute_time> mt1(1.0*minutes);
quantity<hour_time> mt2(1.0*hours);
- quantity<minute_time> mt3(1.0*minutes);
+ quantity<day_time> mt3(1.0*days);
quantity<year_time> mt4(1.0*years);
std::cout << mt1 << std::endl
<< mt2 << std::endl
<< mt3 << std::endl
<< mt4 << std::endl
- << quantity<SI::dimensionless>(mt4/mt1) << std::endl
- << quantity<SI::dimensionless>(mt4/mt2) << std::endl
- << quantity<SI::dimensionless>(mt4/mt3) << std::endl
- << quantity<SI::time>(mt1) << std::endl
- << quantity<SI::time>(mt2) << std::endl
- << quantity<SI::time>(mt3) << std::endl
- << quantity<SI::time>(mt4) << std::endl
<< std::endl;
+
+ std::cout << quantity<si::dimensionless>(mt4/mt1) << std::endl
+ << quantity<si::dimensionless>(mt4/mt2) << std::endl
+ << quantity<si::dimensionless>(mt4/mt3) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::time>(mt1) << std::endl
+ << quantity<si::time>(mt2) << std::endl
+ << quantity<si::time>(mt3) << std::endl
+ << quantity<si::time>(mt4) << std::endl
+ << std::endl;
+
+// std::cout << quantity<minute_time>(mt1) << std::endl
+// << quantity<minute_time>(mt2) << std::endl
+// << quantity<minute_time>(mt3) << std::endl
+// << quantity<minute_time>(mt4) << std::endl
+// << std::endl;
+
+// std::cout << quantity<hour_time>(mt1) << std::endl
+// << quantity<hour_time>(mt2) << std::endl
+// << quantity<hour_time>(mt3) << std::endl
+// << quantity<hour_time>(mt4) << std::endl
+// << std::endl;
+
+ std::cout << quantity<day_time>(mt1) << std::endl
+ << quantity<day_time>(mt2) << std::endl
+ << quantity<day_time>(mt3) << std::endl
+ << quantity<day_time>(mt4) << std::endl
+ << std::endl;
+
+ std::cout << quantity<year_time>(mt1) << std::endl
+ << quantity<year_time>(mt2) << std::endl
+ << quantity<year_time>(mt3) << std::endl
+ << quantity<year_time>(mt4) << std::endl
+ << std::endl;
+
+ quantity<knot_velocity> ms1(1.0*knots);
- quantity<are_area> ma1(1.0*ares);
- quantity<barn_area> ma2(1.0*barns);
+ std::cout << ms1 << std::endl
+ << quantity<si::velocity>(ms1) << std::endl
+ << std::endl;
+
+ quantity<barn_area> ma1(1.0*barns);
+ quantity<are_area> ma2(1.0*ares);
quantity<hectare_area> ma3(1.0*hectares);
+ std::cout << ma1 << std::endl
+ << ma2 << std::endl
+ << ma3 << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(ma3/ma1) << std::endl
+ << quantity<si::dimensionless>(ma3/ma2) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::area>(ma1) << std::endl
+ << quantity<si::area>(ma2) << std::endl
+ << quantity<si::area>(ma3) << std::endl
+ << std::endl;
+
+// std::cout << quantity<barn_area>(ma1) << std::endl
+// << quantity<barn_area>(ma2) << std::endl
+// << quantity<barn_area>(ma3) << std::endl
+// << std::endl;
+
+// std::cout << quantity<are_area>(ma1) << std::endl
+// << quantity<are_area>(ma2) << std::endl
+// << quantity<are_area>(ma3) << std::endl
+// << std::endl;
+
+// std::cout << quantity<hectare_area>(ma1) << std::endl
+// << quantity<hectare_area>(ma2) << std::endl
+// << quantity<hectare_area>(ma3) << std::endl
+// << std::endl;
+
quantity<liter_volume> mv1(1.0*liters);
- quantity<atmosphere_pressure> mp1(1.0*atmospheres);
- quantity<bar_pressure> mp2(1.0*bars);
- quantity<torr_pressure> mp3(1.0*torrs);
+ std::cout << mv1 << std::endl
+ << quantity<si::volume>(mv1) << std::endl
+ << std::endl;
+
+ quantity<mmHg_pressure> mp1(1.0*mmHgs);
+ quantity<torr_pressure> mp2(1.0*torrs);
+ quantity<bar_pressure> mp3(1.0*bars);
+ quantity<atmosphere_pressure> mp4(1.0*atmospheres);
+
+ std::cout << mp1 << std::endl
+ << mp2 << std::endl
+ << mp3 << std::endl
+ << mp4 << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(mp4/mp1) << std::endl
+ << quantity<si::dimensionless>(mp4/mp2) << std::endl
+ << quantity<si::dimensionless>(mp4/mp3) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::pressure>(mp1) << std::endl
+ << quantity<si::pressure>(mp2) << std::endl
+ << quantity<si::pressure>(mp3) << std::endl
+ << quantity<si::pressure>(mp4) << std::endl
+ << std::endl;
+
+// std::cout << quantity<mmHg_pressure>(mp1) << std::endl
+// << quantity<mmHg_pressure>(mp2) << std::endl
+// << quantity<mmHg_pressure>(mp3) << std::endl
+// << quantity<mmHg_pressure>(mp4) << std::endl
+// << std::endl;
+
+// std::cout << quantity<torr_pressure>(mp1) << std::endl
+// << quantity<torr_pressure>(mp2) << std::endl
+// << quantity<torr_pressure>(mp3) << std::endl
+// << quantity<torr_pressure>(mp4) << std::endl
+// << std::endl;
+
+// std::cout << quantity<bar_pressure>(mp1) << std::endl
+// << quantity<bar_pressure>(mp2) << std::endl
+// << quantity<bar_pressure>(mp3) << std::endl
+// << quantity<bar_pressure>(mp4) << std::endl
+// << std::endl;
+
+// std::cout << quantity<atmosphere_pressure>(mp1) << std::endl
+// << quantity<atmosphere_pressure>(mp2) << std::endl
+// << quantity<atmosphere_pressure>(mp3) << std::endl
+// << quantity<atmosphere_pressure>(mp4) << std::endl
+// << std::endl;
+ }
+
+ {
+ using namespace boost::units::us;
+
+ std::cout << "Testing U.S. customary base units..." << std::endl;
+
+ quantity<mil_length> iml1(1.0*mils);
+ quantity<inch_length> iml2(1.0*inchs);
+ quantity<foot_length> iml3(1.0*foots);
+ quantity<yard_length> iml4(1.0*yards);
+ quantity<mile_length> iml5(1.0*miles);
+
+ std::cout << iml1 << std::endl
+ << iml2 << std::endl
+ << iml3 << std::endl
+ << iml4 << std::endl
+ << iml5 << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(iml5/iml1) << std::endl
+ << quantity<si::dimensionless>(iml5/iml2) << std::endl
+ << quantity<si::dimensionless>(iml5/iml3) << std::endl
+ << quantity<si::dimensionless>(iml5/iml4) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::length>(iml1) << std::endl
+ << quantity<si::length>(iml2) << std::endl
+ << quantity<si::length>(iml3) << std::endl
+ << quantity<si::length>(iml4) << std::endl
+ << quantity<si::length>(iml5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<mil_length>(iml1) << std::endl
+ << quantity<mil_length>(iml2) << std::endl
+ << quantity<mil_length>(iml3) << std::endl
+ << quantity<mil_length>(iml4) << std::endl
+ << quantity<mil_length>(iml5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<inch_length>(iml1) << std::endl
+ << quantity<inch_length>(iml2) << std::endl
+ << quantity<inch_length>(iml3) << std::endl
+ << quantity<inch_length>(iml4) << std::endl
+ << quantity<inch_length>(iml5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<foot_length>(iml1) << std::endl
+ << quantity<foot_length>(iml2) << std::endl
+ << quantity<foot_length>(iml3) << std::endl
+ << quantity<foot_length>(iml4) << std::endl
+ << quantity<foot_length>(iml5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<yard_length>(iml1) << std::endl
+ << quantity<yard_length>(iml2) << std::endl
+ << quantity<yard_length>(iml3) << std::endl
+ << quantity<yard_length>(iml4) << std::endl
+ << quantity<yard_length>(iml5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<mile_length>(iml1) << std::endl
+ << quantity<mile_length>(iml2) << std::endl
+ << quantity<mile_length>(iml3) << std::endl
+ << quantity<mile_length>(iml4) << std::endl
+ << quantity<mile_length>(iml5) << std::endl
+ << std::endl;
+
+ quantity<grain_mass> imm1(1.0*grains);
+ quantity<dram_mass> imm2(1.0*drams);
+ quantity<ounce_mass> imm3(1.0*ounces);
+ quantity<pound_mass> imm4(1.0*pounds);
+ quantity<hundredweight_mass> imm5(1.0*hundredweights);
+ quantity<ton_mass> imm6(1.0*tons);
+
+ std::cout << imm1 << std::endl
+ << imm2 << std::endl
+ << imm3 << std::endl
+ << imm4 << std::endl
+ << imm5 << std::endl
+ << imm6 << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(imm6/imm1) << std::endl
+ << quantity<si::dimensionless>(imm6/imm2) << std::endl
+ << quantity<si::dimensionless>(imm6/imm3) << std::endl
+ << quantity<si::dimensionless>(imm6/imm4) << std::endl
+ << quantity<si::dimensionless>(imm6/imm5) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::mass>(imm1) << std::endl
+ << quantity<si::mass>(imm2) << std::endl
+ << quantity<si::mass>(imm3) << std::endl
+ << quantity<si::mass>(imm4) << std::endl
+ << quantity<si::mass>(imm5) << std::endl
+ << quantity<si::mass>(imm6) << std::endl
+ << std::endl;
+
+ std::cout << quantity<grain_mass>(imm1) << std::endl
+ << quantity<grain_mass>(imm2) << std::endl
+ << quantity<grain_mass>(imm3) << std::endl
+ << quantity<grain_mass>(imm4) << std::endl
+ << quantity<grain_mass>(imm5) << std::endl
+ << quantity<grain_mass>(imm6) << std::endl
+ << std::endl;
+
+ std::cout << quantity<dram_mass>(imm1) << std::endl
+ << quantity<dram_mass>(imm2) << std::endl
+ << quantity<dram_mass>(imm3) << std::endl
+ << quantity<dram_mass>(imm4) << std::endl
+ << quantity<dram_mass>(imm5) << std::endl
+ << quantity<dram_mass>(imm6) << std::endl
+ << std::endl;
+
+ std::cout << quantity<ounce_mass>(imm1) << std::endl
+ << quantity<ounce_mass>(imm2) << std::endl
+ << quantity<ounce_mass>(imm3) << std::endl
+ << quantity<ounce_mass>(imm4) << std::endl
+ << quantity<ounce_mass>(imm5) << std::endl
+ << quantity<ounce_mass>(imm6) << std::endl
+ << std::endl;
+
+ std::cout << quantity<pound_mass>(imm1) << std::endl
+ << quantity<pound_mass>(imm2) << std::endl
+ << quantity<pound_mass>(imm3) << std::endl
+ << quantity<pound_mass>(imm4) << std::endl
+ << quantity<pound_mass>(imm5) << std::endl
+ << quantity<pound_mass>(imm6) << std::endl
+ << std::endl;
+
+ std::cout << quantity<hundredweight_mass>(imm1) << std::endl
+ << quantity<hundredweight_mass>(imm2) << std::endl
+ << quantity<hundredweight_mass>(imm3) << std::endl
+ << quantity<hundredweight_mass>(imm4) << std::endl
+ << quantity<hundredweight_mass>(imm5) << std::endl
+ << quantity<hundredweight_mass>(imm6) << std::endl
+ << std::endl;
+
+ std::cout << quantity<ton_mass>(imm1) << std::endl
+ << quantity<ton_mass>(imm2) << std::endl
+ << quantity<ton_mass>(imm3) << std::endl
+ << quantity<ton_mass>(imm4) << std::endl
+ << quantity<ton_mass>(imm5) << std::endl
+ << quantity<ton_mass>(imm6) << std::endl
+ << std::endl;
+
+ quantity<minim_volume> imv1(1.0*minims);
+ quantity<fluid_dram_volume> imv2(1.0*fluid_drams);
+ quantity<teaspoon_volume> imv3(1.0*teaspoons);
+ quantity<tablespoon_volume> imv4(1.0*tablespoons);
+ quantity<fluid_ounce_volume> imv5(1.0*fluid_ounces);
+ quantity<gill_volume> imv6(1.0*gills);
+ quantity<cup_volume> imv7(1.0*cups);
+ quantity<pint_volume> imv8(1.0*pints);
+ quantity<quart_volume> imv9(1.0*quarts);
+ quantity<gallon_volume> imv10(1.0*gallons);
+
+ std::cout << imv1 << std::endl
+ << imv2 << std::endl
+ << imv3 << std::endl
+ << imv4 << std::endl
+ << imv5 << std::endl
+ << imv6 << std::endl
+ << imv7 << std::endl
+ << imv8 << std::endl
+ << imv9 << std::endl
+ << imv10 << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::dimensionless>(imv10/imv1) << std::endl
+ << quantity<si::dimensionless>(imv10/imv2) << std::endl
+ << quantity<si::dimensionless>(imv10/imv3) << std::endl
+ << quantity<si::dimensionless>(imv10/imv4) << std::endl
+ << quantity<si::dimensionless>(imv10/imv5) << std::endl
+ << quantity<si::dimensionless>(imv10/imv6) << std::endl
+ << quantity<si::dimensionless>(imv10/imv7) << std::endl
+ << quantity<si::dimensionless>(imv10/imv8) << std::endl
+ << quantity<si::dimensionless>(imv10/imv9) << std::endl
+ << std::endl;
+
+ std::cout << quantity<si::volume>(imv1) << std::endl
+ << quantity<si::volume>(imv2) << std::endl
+ << quantity<si::volume>(imv3) << std::endl
+ << quantity<si::volume>(imv4) << std::endl
+ << quantity<si::volume>(imv5) << std::endl
+ << quantity<si::volume>(imv6) << std::endl
+ << quantity<si::volume>(imv7) << std::endl
+ << quantity<si::volume>(imv8) << std::endl
+ << quantity<si::volume>(imv9) << std::endl
+ << quantity<si::volume>(imv10) << std::endl
+ << std::endl;
+
+ std::cout << quantity<minim_volume>(imv1) << std::endl
+ << quantity<minim_volume>(imv2) << std::endl
+ << quantity<minim_volume>(imv3) << std::endl
+ << quantity<minim_volume>(imv4) << std::endl
+ << quantity<minim_volume>(imv5) << std::endl
+ << quantity<minim_volume>(imv6) << std::endl
+ << quantity<minim_volume>(imv7) << std::endl
+ << quantity<minim_volume>(imv8) << std::endl
+ << quantity<minim_volume>(imv9) << std::endl
+ << quantity<minim_volume>(imv10) << std::endl
+ << std::endl;
+
+// std::cout << quantity<fluid_dram_volume>(imv1) << std::endl
+// << quantity<fluid_dram_volume>(imv2) << std::endl
+// << quantity<fluid_dram_volume>(imv3) << std::endl
+// << quantity<fluid_dram_volume>(imv4) << std::endl
+// << quantity<fluid_dram_volume>(imv5) << std::endl
+// << quantity<fluid_dram_volume>(imv6) << std::endl
+// << quantity<fluid_dram_volume>(imv7) << std::endl
+// << quantity<fluid_dram_volume>(imv8) << std::endl
+// << quantity<fluid_dram_volume>(imv9) << std::endl
+// << quantity<fluid_dram_volume>(imv10) << std::endl
+// << std::endl;
+
+ std::cout << quantity<teaspoon_volume>(imv1) << std::endl
+ << quantity<teaspoon_volume>(imv2) << std::endl
+ << quantity<teaspoon_volume>(imv3) << std::endl
+ << quantity<teaspoon_volume>(imv4) << std::endl
+ << quantity<teaspoon_volume>(imv5) << std::endl
+ << quantity<teaspoon_volume>(imv6) << std::endl
+ << quantity<teaspoon_volume>(imv7) << std::endl
+ << quantity<teaspoon_volume>(imv8) << std::endl
+ << quantity<teaspoon_volume>(imv9) << std::endl
+ << quantity<teaspoon_volume>(imv10) << std::endl
+ << std::endl;
+
+// std::cout << quantity<tablespoon_volume>(imv1) << std::endl
+// << quantity<tablespoon_volume>(imv2) << std::endl
+// << quantity<tablespoon_volume>(imv3) << std::endl
+// << quantity<tablespoon_volume>(imv4) << std::endl
+// << quantity<tablespoon_volume>(imv5) << std::endl
+// << quantity<tablespoon_volume>(imv6) << std::endl
+// << quantity<tablespoon_volume>(imv7) << std::endl
+// << quantity<tablespoon_volume>(imv8) << std::endl
+// << quantity<tablespoon_volume>(imv9) << std::endl
+// << quantity<tablespoon_volume>(imv10) << std::endl
+// << std::endl;
+
+ std::cout << quantity<fluid_ounce_volume>(imv1) << std::endl
+ << quantity<fluid_ounce_volume>(imv2) << std::endl
+ << quantity<fluid_ounce_volume>(imv3) << std::endl
+ << quantity<fluid_ounce_volume>(imv4) << std::endl
+ << quantity<fluid_ounce_volume>(imv5) << std::endl
+ << quantity<fluid_ounce_volume>(imv6) << std::endl
+ << quantity<fluid_ounce_volume>(imv7) << std::endl
+ << quantity<fluid_ounce_volume>(imv8) << std::endl
+ << quantity<fluid_ounce_volume>(imv9) << std::endl
+ << quantity<fluid_ounce_volume>(imv10) << std::endl
+ << std::endl;
+//
+// std::cout << quantity<gill_volume>(imv1) << std::endl
+// << quantity<gill_volume>(imv2) << std::endl
+// << quantity<gill_volume>(imv3) << std::endl
+// << quantity<gill_volume>(imv4) << std::endl
+// << quantity<gill_volume>(imv5) << std::endl
+// << quantity<gill_volume>(imv6) << std::endl
+// << quantity<gill_volume>(imv7) << std::endl
+// << quantity<gill_volume>(imv8) << std::endl
+// << quantity<gill_volume>(imv9) << std::endl
+// << quantity<gill_volume>(imv10) << std::endl
+// << std::endl;
+//
+// std::cout << quantity<cup_volume>(imv1) << std::endl
+// << quantity<cup_volume>(imv2) << std::endl
+// << quantity<cup_volume>(imv3) << std::endl
+// << quantity<cup_volume>(imv4) << std::endl
+// << quantity<cup_volume>(imv5) << std::endl
+// << quantity<cup_volume>(imv6) << std::endl
+// << quantity<cup_volume>(imv7) << std::endl
+// << quantity<cup_volume>(imv8) << std::endl
+// << quantity<cup_volume>(imv9) << std::endl
+// << quantity<cup_volume>(imv10) << std::endl
+// << std::endl;
+//
+// std::cout << quantity<pint_volume>(imv1) << std::endl
+// << quantity<pint_volume>(imv2) << std::endl
+// << quantity<pint_volume>(imv3) << std::endl
+// << quantity<pint_volume>(imv4) << std::endl
+// << quantity<pint_volume>(imv5) << std::endl
+// << quantity<pint_volume>(imv6) << std::endl
+// << quantity<pint_volume>(imv7) << std::endl
+// << quantity<pint_volume>(imv8) << std::endl
+// << quantity<pint_volume>(imv9) << std::endl
+// << quantity<pint_volume>(imv10) << std::endl
+// << std::endl;
+//
+// std::cout << quantity<quart_volume>(imv1) << std::endl
+// << quantity<quart_volume>(imv2) << std::endl
+// << quantity<quart_volume>(imv3) << std::endl
+// << quantity<quart_volume>(imv4) << std::endl
+// << quantity<quart_volume>(imv5) << std::endl
+// << quantity<quart_volume>(imv6) << std::endl
+// << quantity<quart_volume>(imv7) << std::endl
+// << quantity<quart_volume>(imv8) << std::endl
+// << quantity<quart_volume>(imv9) << std::endl
+// << quantity<quart_volume>(imv10) << std::endl
+// << std::endl;
+//
+// std::cout << quantity<gallon_volume>(imv1) << std::endl
+// << quantity<gallon_volume>(imv2) << std::endl
+// << quantity<gallon_volume>(imv3) << std::endl
+// << quantity<gallon_volume>(imv4) << std::endl
+// << quantity<gallon_volume>(imv5) << std::endl
+// << quantity<gallon_volume>(imv6) << std::endl
+// << quantity<gallon_volume>(imv7) << std::endl
+// << quantity<gallon_volume>(imv8) << std::endl
+// << quantity<gallon_volume>(imv9) << std::endl
+// << quantity<gallon_volume>(imv10) << std::endl
+// << std::endl;
}
return 0;
Modified: sandbox/units/libs/units/example/temperature.cpp
==============================================================================
--- sandbox/units/libs/units/example/temperature.cpp (original)
+++ sandbox/units/libs/units/example/temperature.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -44,7 +44,7 @@
#include <boost/units/systems/si/temperature.hpp>
#include <boost/units/detail/utility.hpp>
-#include <boost/units/systems/temperature/base_units/fahrenheit.hpp>
+#include <boost/units/base_units/temperature/fahrenheit.hpp>
using namespace boost::units;
@@ -68,14 +68,14 @@
//[temperature_snippet_2
template<>
struct is_implicitly_convertible<unit<temperature_dimension,fahrenheit::system>,
- unit<temperature_dimension,SI::system> > :
+ unit<temperature_dimension,si::system> > :
public mpl::true_
{ };
template<>
struct is_implicitly_convertible<
absolute< unit<temperature_dimension,fahrenheit::system> >,
- absolute< unit<temperature_dimension,SI::system> > > :
+ absolute< unit<temperature_dimension,si::system> > > :
public mpl::true_
{ };
//]
@@ -94,18 +94,18 @@
quantity<fahrenheit::temperature> T1v(
32.0*fahrenheit::degrees);
- quantity<absolute<SI::temperature> > T2p(T1p);
- quantity<absolute<SI::temperature> > T3p = T1p;
- quantity<SI::temperature> T2v(T1v);
- quantity<SI::temperature> T3v = T1v;
+ quantity<absolute<si::temperature> > T2p(T1p);
+ quantity<absolute<si::temperature> > T3p = T1p;
+ quantity<si::temperature> T2v(T1v);
+ quantity<si::temperature> T3v = T1v;
//]
typedef conversion_helper<
quantity<absolute<fahrenheit::temperature> >,
- quantity<absolute<SI::temperature> > > absolute_conv_type;
+ quantity<absolute<si::temperature> > > absolute_conv_type;
typedef conversion_helper<
quantity<fahrenheit::temperature>,
- quantity<SI::temperature> > relative_conv_type;
+ quantity<si::temperature> > relative_conv_type;
sstream1 << T1p << std::endl
<< absolute_conv_type::convert(T1p) << std::endl
Modified: sandbox/units/libs/units/example/tutorial.cpp
==============================================================================
--- sandbox/units/libs/units/example/tutorial.cpp (original)
+++ sandbox/units/libs/units/example/tutorial.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -14,7 +14,7 @@
\brief tutorial.cpp
\detailed
-Basic tutorial using SI units.
+Basic tutorial using si units.
Output:
@verbatim
@@ -49,7 +49,7 @@
#include <boost/units/systems/si/resistance.hpp>
using namespace boost::units;
-using namespace boost::units::SI;
+using namespace boost::units::si;
quantity<energy>
work(const quantity<force>& F,const quantity<length>& dx)
Modified: sandbox/units/libs/units/test/fail_add_temperature.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_add_temperature.cpp (original)
+++ sandbox/units/libs/units/test/fail_add_temperature.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -30,7 +30,7 @@
int main(int,char *[])
{
- bu::quantity<bu::absolute<bu::SI::temperature> > q(2.0 * bu::absolute<bu::SI::temperature>());
+ bu::quantity<bu::absolute<bu::si::temperature> > q(2.0 * bu::absolute<bu::si::temperature>());
q += q;
Modified: sandbox/units/libs/units/test/fail_adl_detail.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_adl_detail.cpp (original)
+++ sandbox/units/libs/units/test/fail_adl_detail.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -40,7 +40,7 @@
int main(int argc,char *argv[])
{
- bu::quantity<bu::SI::energy> q;
+ bu::quantity<bu::si::energy> q;
this_function_should_not_be_found_by_adl(q);
Modified: sandbox/units/libs/units/test/fail_heterogeneous_unit.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_heterogeneous_unit.cpp (original)
+++ sandbox/units/libs/units/test/fail_heterogeneous_unit.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -21,6 +21,7 @@
@endverbatim
**/
+#include <boost/units/pow.hpp>
#include <boost/units/quantity.hpp>
#include <boost/units/systems/si.hpp>
#include <boost/units/systems/cgs.hpp>
@@ -31,15 +32,15 @@
template<class System>
bu::quantity<bu::unit<bu::energy_dimension, System> > f(bu::quantity<bu::unit<bu::length_dimension, System> > l) {
- return(static_cast<bu::quantity<bu::unit<bu::energy_dimension, System> > >(f(static_cast<bu::quantity<bu::SI::length> >(l))));
+ return(static_cast<bu::quantity<bu::unit<bu::energy_dimension, System> > >(f(static_cast<bu::quantity<bu::si::length> >(l))));
}
-bu::quantity<bu::SI::energy> f(bu::quantity<bu::SI::length> l) {
- return(l * l * 2.0 * bu::SI::kilograms / bu::pow<2>(bu::SI::seconds));
+bu::quantity<bu::si::energy> f(bu::quantity<bu::si::length> l) {
+ return(l * l * 2.0 * bu::si::kilograms / bu::pow<2>(bu::si::seconds));
}
int main() {
- f(1.0 * bu::pow<2>(bu::SI::meters) / bu::CGS::centimeters);
+ f(1.0 * bu::pow<2>(bu::si::meters) / bu::cgs::centimeters);
return(0);
}
Modified: sandbox/units/libs/units/test/fail_implicit_conversion.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_implicit_conversion.cpp (original)
+++ sandbox/units/libs/units/test/fail_implicit_conversion.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,8 +29,8 @@
int main(int,char *[])
{
- const bu::quantity<bu::SI::length> T1(2.0 * bu::SI::meters);
- const bu::quantity<bu::CGS::length> T2 = T1;
+ const bu::quantity<bu::si::length> T1(2.0 * bu::si::meters);
+ const bu::quantity<bu::cgs::length> T2 = T1;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_add.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_add.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_add.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 * bu::SI::seconds + 2.0 * bu::SI::meters;
+ 2.0 * bu::si::seconds + 2.0 * bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_add_assign.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_add_assign.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_add_assign.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,8 +29,8 @@
int main(int,char *[])
{
- bu::quantity<bu::SI::length> T1;
- T1 += 2.0 * bu::SI::seconds;
+ bu::quantity<bu::si::length> T1;
+ T1 += 2.0 * bu::si::seconds;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_assign.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_assign.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_assign.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,8 +29,8 @@
int main(int argc,char *argv[])
{
- const bu::quantity<bu::SI::length> T1;
- T1 = 2.0 * bu::SI::seconds;
+ const bu::quantity<bu::si::length> T1;
+ T1 = 2.0 * bu::si::seconds;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_construct.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_construct.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_construct.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int,char *[])
{
- const bu::quantity<bu::SI::length> T1(2.0 * bu::SI::seconds);
+ const bu::quantity<bu::si::length> T1(2.0 * bu::si::seconds);
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_non_unit.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_non_unit.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_non_unit.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -23,7 +23,7 @@
**/
#include <boost/units/quantity.hpp>
-#include <boost/units/systems/base_units/meter.hpp>
+#include <boost/units/base_units/si/meter.hpp>
namespace bu = boost::units;
Modified: sandbox/units/libs/units/test/fail_quantity_scalar_add.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_scalar_add.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_scalar_add.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 * bu::SI::meters + 2.0;
+ 2.0 * bu::si::meters + 2.0;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_scalar_sub.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_scalar_sub.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_scalar_sub.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 * bu::SI::meters - 2.0;
+ 2.0 * bu::si::meters - 2.0;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_sub_assign.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_sub_assign.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_sub_assign.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,8 +29,8 @@
int main(int,char *[])
{
- bu::quantity<bu::SI::length> T1;
- T1 -= 2.0 * bu::SI::seconds;
+ bu::quantity<bu::si::length> T1;
+ T1 -= 2.0 * bu::si::seconds;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_subtract.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_subtract.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_subtract.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 * bu::SI::seconds - 2.0 * bu::SI::meters;
+ 2.0 * bu::si::seconds - 2.0 * bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_unit_add.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_unit_add.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_unit_add.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 * bu::SI::meters + bu::SI::meters;
+ 2.0 * bu::si::meters + bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_quantity_unit_subtract.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_quantity_unit_subtract.cpp (original)
+++ sandbox/units/libs/units/test/fail_quantity_unit_subtract.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 * bu::SI::meters - bu::SI::meters;
+ 2.0 * bu::si::meters - bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_scalar_quantity_add.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_scalar_quantity_add.cpp (original)
+++ sandbox/units/libs/units/test/fail_scalar_quantity_add.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 + 2.0 * bu::SI::meters;
+ 2.0 + 2.0 * bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_scalar_quantity_sub.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_scalar_quantity_sub.cpp (original)
+++ sandbox/units/libs/units/test/fail_scalar_quantity_sub.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- 2.0 - 2.0 * bu::SI::meters;
+ 2.0 - 2.0 * bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_unit_quantity_add.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_unit_quantity_add.cpp (original)
+++ sandbox/units/libs/units/test/fail_unit_quantity_add.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- bu::SI::meters + 2.0 * bu::SI::meters;
+ bu::si::meters + 2.0 * bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/fail_unit_quantity_subtract.cpp
==============================================================================
--- sandbox/units/libs/units/test/fail_unit_quantity_subtract.cpp (original)
+++ sandbox/units/libs/units/test/fail_unit_quantity_subtract.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -29,7 +29,7 @@
int main(int argc,char *argv[])
{
- bu::SI::meters + 2.0 * bu::SI::meters;
+ bu::si::meters + 2.0 * bu::si::meters;
return 0;
}
Modified: sandbox/units/libs/units/test/test_absolute.cpp
==============================================================================
--- sandbox/units/libs/units/test/test_absolute.cpp (original)
+++ sandbox/units/libs/units/test/test_absolute.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -25,10 +25,10 @@
#include <boost/units/absolute.hpp>
#include <boost/units/unit.hpp>
#include <boost/units/make_system.hpp>
-#include <boost/units/systems/physical_dimensions.hpp>
-#include <boost/units/systems/si/base_units/kelvin.hpp>
-#include <boost/units/systems/temperature/base_units/celsius.hpp>
-#include <boost/units/systems/temperature/base_units/fahrenheit.hpp>
+#include <boost/units/physical_dimensions.hpp>
+#include <boost/units/base_units/si/kelvin.hpp>
+#include <boost/units/base_units/temperature/celsius.hpp>
+#include <boost/units/base_units/temperature/fahrenheit.hpp>
#include <iostream>
@@ -37,7 +37,7 @@
#define BOOST_UNITS_CHECK_CLOSE(a, b) (BOOST_CHECK((std::abs((a) - (b)) < .0000001)))
namespace bu = boost::units;
-using bu::SI::kelvin_base_unit;
+using bu::si::kelvin_base_unit;
using bu::temperature::celsius_base_unit;
using bu::temperature::fahrenheit_base_unit;
Modified: sandbox/units/libs/units/test/test_conversion.cpp
==============================================================================
--- sandbox/units/libs/units/test/test_conversion.cpp (original)
+++ sandbox/units/libs/units/test/test_conversion.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -33,15 +33,15 @@
namespace bu = boost::units;
-typedef bu::SI::length si_length;
-typedef bu::SI::time si_time;
-typedef bu::SI::mass si_mass;
-typedef bu::SI::area si_area;
-
-typedef bu::CGS::length cgs_length;
-typedef bu::CGS::time cgs_time;
-typedef bu::CGS::mass cgs_mass;
-typedef bu::CGS::area cgs_area;
+typedef bu::si::length si_length;
+typedef bu::si::time si_time;
+typedef bu::si::mass si_mass;
+typedef bu::si::area si_area;
+
+typedef bu::cgs::length cgs_length;
+typedef bu::cgs::time cgs_time;
+typedef bu::cgs::mass cgs_mass;
+typedef bu::cgs::area cgs_area;
typedef bu::multiply_typeof_helper<si_length, cgs_length>::type mixed_length;
typedef bu::multiply_typeof_helper<si_time, cgs_time>::type mixed_time;
@@ -66,33 +66,33 @@
BOOST_CHECK((std::abs(e2.value() - 20.0) < .0001));
- bu::quantity<bu::SI::energy> e3(e1);
+ bu::quantity<bu::si::energy> e3(e1);
BOOST_CHECK((std::abs(e3.value() - .0002) < .0001));
bu::quantity<mixed_energy_2> e4(e3);
BOOST_CHECK((std::abs(e4.value() - 20.0) < .0001));
- bu::quantity<bu::CGS::force> F0 = 20 * bu::CGS::dyne;
+ bu::quantity<bu::cgs::force> F0 = 20 * bu::cgs::dyne;
BOOST_CHECK((std::abs(F0.value() - 20.0) < .0001));
- bu::quantity<bu::SI::force> F3(F0);
+ bu::quantity<bu::si::force> F3(F0);
BOOST_CHECK((std::abs(F3.value() - 2.0e-4) < .000000001));
- bu::quantity<bu::SI::force> F5(20 * bu::CGS::dyne);
+ bu::quantity<bu::si::force> F5(20 * bu::cgs::dyne);
BOOST_CHECK((std::abs(F5.value() - 2.0e-4) < .000000001));
- bu::quantity<bu::SI::dimensionless> dimensionless_test1(1.0*bu::CGS::dyne/bu::SI::newton);
+ bu::quantity<bu::si::dimensionless> dimensionless_test1(1.0*bu::cgs::dyne/bu::si::newton);
BOOST_CHECK(dimensionless_test1 == 1e-5);
- typedef bu::multiply_typeof_helper<bu::SI::length, bu::CGS::length>::type m_cm;
+ typedef bu::multiply_typeof_helper<bu::si::length, bu::cgs::length>::type m_cm;
typedef bu::divide_typeof_helper<m_cm, m_cm>::type heterogeneous_dimensionless;
- bu::quantity<heterogeneous_dimensionless> dimensionless_test2(1.0*bu::CGS::dyne/bu::SI::newton);
+ bu::quantity<heterogeneous_dimensionless> dimensionless_test2(1.0*bu::cgs::dyne/bu::si::newton);
BOOST_CHECK(dimensionless_test2.value() == 1e-5);
- bu::quantity<bu::divide_typeof_helper<bu::CGS::force, bu::SI::force>::type> dimensionless_test3(dimensionless_test2);
+ bu::quantity<bu::divide_typeof_helper<bu::cgs::force, bu::si::force>::type> dimensionless_test3(dimensionless_test2);
BOOST_UNITS_CHECK_CLOSE(dimensionless_test3.value(), 1.0);
//m/cm -> g/kg
- bu::quantity<bu::divide_typeof_helper<bu::SI::length, bu::CGS::length>::type> dimensionless_test4(2.0 * bu::SI::meters / bu::CGS::centimeters);
- bu::quantity<bu::divide_typeof_helper<bu::CGS::mass, bu::SI::mass>::type> dimensionless_test5(dimensionless_test4);
+ bu::quantity<bu::divide_typeof_helper<bu::si::length, bu::cgs::length>::type> dimensionless_test4(2.0 * bu::si::meters / bu::cgs::centimeters);
+ bu::quantity<bu::divide_typeof_helper<bu::cgs::mass, bu::si::mass>::type> dimensionless_test5(dimensionless_test4);
BOOST_UNITS_CHECK_CLOSE(dimensionless_test5.value(), 2e5);
return(0);
Modified: sandbox/units/libs/units/test/test_dimensionless_ice1.cpp
==============================================================================
--- sandbox/units/libs/units/test/test_dimensionless_ice1.cpp (original)
+++ sandbox/units/libs/units/test/test_dimensionless_ice1.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -12,7 +12,7 @@
void foo()
{
- boost::units::quantity<boost::units::SI::dimensionless> d = boost::units::quantity< boost::units::SI::dimensionless >();
+ boost::units::quantity<boost::units::si::dimensionless> d = boost::units::quantity< boost::units::si::dimensionless >();
}
#include <boost/test/test_tools.hpp>
Modified: sandbox/units/libs/units/test/test_dimensionless_ice2.cpp
==============================================================================
--- sandbox/units/libs/units/test/test_dimensionless_ice2.cpp (original)
+++ sandbox/units/libs/units/test/test_dimensionless_ice2.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -13,7 +13,7 @@
void foo()
{
- boost::units::quantity<boost::units::SI::dimensionless> d(1.0 * boost::units::SI::meters / boost::units::CGS::centimeters);
+ boost::units::quantity<boost::units::si::dimensionless> d(1.0 * boost::units::si::meters / boost::units::cgs::centimeters);
}
#include <boost/test/test_tools.hpp>
Modified: sandbox/units/libs/units/test/test_implicit_conversion.cpp
==============================================================================
--- sandbox/units/libs/units/test/test_implicit_conversion.cpp (original)
+++ sandbox/units/libs/units/test/test_implicit_conversion.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -34,80 +34,80 @@
int test_main(int,char *[])
{
- //// SI->SI always true
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::current_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::temperature_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::amount_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::luminous_intensity_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::plane_angle_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::solid_angle_base_dimension,bu::SI::system_tag,bu::SI::system_tag>::value == true));
-
- //// CGS->CGS always true
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::current_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::temperature_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::amount_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::luminous_intensity_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::plane_angle_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::solid_angle_base_dimension,bu::CGS::system_tag,bu::CGS::system_tag>::value == true));
-
- //// SI->CGS
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::SI::system_tag,bu::CGS::system_tag>::value == false));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::SI::system_tag,bu::CGS::system_tag>::value == false));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::SI::system_tag,bu::CGS::system_tag>::value == true));
-
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::length,bu::CGS::length>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::mass,bu::CGS::mass>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::time,bu::CGS::time>::value == true));
-
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::acceleration,bu::CGS::acceleration>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::area,bu::CGS::area>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::energy,bu::CGS::energy>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::force,bu::CGS::force>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::frequency,bu::CGS::frequency>::value == true));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::mass_density,bu::CGS::mass_density>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::momentum,bu::CGS::momentum>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::power,bu::CGS::power>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::pressure,bu::CGS::pressure>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::velocity,bu::CGS::velocity>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::wavenumber,bu::CGS::wavenumber>::value == false));
-
- //// CGS->SI
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::CGS::system_tag,bu::SI::system_tag>::value == false));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::CGS::system_tag,bu::SI::system_tag>::value == false));
- //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::CGS::system_tag,bu::SI::system_tag>::value == true));
+ //// si->si always true
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::current_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::temperature_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::amount_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::luminous_intensity_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::plane_angle_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::solid_angle_base_dimension,bu::si::system_tag,bu::si::system_tag>::value == true));
+
+ //// cgs->cgs always true
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::current_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::temperature_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::amount_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::luminous_intensity_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::plane_angle_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::solid_angle_base_dimension,bu::cgs::system_tag,bu::cgs::system_tag>::value == true));
+
+ //// si->cgs
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::si::system_tag,bu::cgs::system_tag>::value == false));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::si::system_tag,bu::cgs::system_tag>::value == false));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::si::system_tag,bu::cgs::system_tag>::value == true));
+
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::length,bu::cgs::length>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::mass,bu::cgs::mass>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::time,bu::cgs::time>::value == true));
+
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::acceleration,bu::cgs::acceleration>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::area,bu::cgs::area>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::energy,bu::cgs::energy>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::force,bu::cgs::force>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::frequency,bu::cgs::frequency>::value == true));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::mass_density,bu::cgs::mass_density>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::momentum,bu::cgs::momentum>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::power,bu::cgs::power>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::pressure,bu::cgs::pressure>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::velocity,bu::cgs::velocity>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::si::wavenumber,bu::cgs::wavenumber>::value == false));
+
+ //// cgs->si
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_base_dimension,bu::cgs::system_tag,bu::si::system_tag>::value == false));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_base_dimension,bu::cgs::system_tag,bu::si::system_tag>::value == false));
+ //BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_base_dimension,bu::cgs::system_tag,bu::si::system_tag>::value == true));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::length,bu::SI::length>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::mass,bu::SI::mass>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::time,bu::SI::time>::value == true));
-
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::acceleration,bu::SI::acceleration>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::area,bu::SI::area>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::energy,bu::SI::energy>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::force,bu::SI::force>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::frequency,bu::SI::frequency>::value == true));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::mass_density,bu::SI::mass_density>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::momentum,bu::SI::momentum>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::power,bu::SI::power>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::pressure,bu::SI::pressure>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::velocity,bu::SI::velocity>::value == false));
- BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::wavenumber,bu::SI::wavenumber>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::length,bu::si::length>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::mass,bu::si::mass>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::time,bu::si::time>::value == true));
+
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::acceleration,bu::si::acceleration>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::area,bu::si::area>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::energy,bu::si::energy>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::force,bu::si::force>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::frequency,bu::si::frequency>::value == true));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::mass_density,bu::si::mass_density>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::momentum,bu::si::momentum>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::power,bu::si::power>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::pressure,bu::si::pressure>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::velocity,bu::si::velocity>::value == false));
+ BOOST_CHECK((bu::is_implicitly_convertible<bu::cgs::wavenumber,bu::si::wavenumber>::value == false));
- const bu::quantity<bu::SI::time> S1(2.0*bu::SI::seconds);
- const bu::quantity<bu::CGS::time> S2 = S1;
+ const bu::quantity<bu::si::time> S1(2.0*bu::si::seconds);
+ const bu::quantity<bu::cgs::time> S2 = S1;
BOOST_CHECK((S1.value() == S2.value()));
- const bu::quantity<bu::SI::catalytic_activity> S3(2.0*bu::SI::catalytic_activity());
+ const bu::quantity<bu::si::catalytic_activity> S3(2.0*bu::si::catalytic_activity());
- const bu::quantity<bu::CGS::time> C1(2.0*bu::CGS::seconds);
- const bu::quantity<bu::SI::time> C2 = C1;
+ const bu::quantity<bu::cgs::time> C1(2.0*bu::cgs::seconds);
+ const bu::quantity<bu::si::time> C2 = C1;
BOOST_CHECK((C1.value() == C2.value()));
Modified: sandbox/units/libs/units/tutorial/tutorial_1.cpp
==============================================================================
--- sandbox/units/libs/units/tutorial/tutorial_1.cpp (original)
+++ sandbox/units/libs/units/tutorial/tutorial_1.cpp 2008-05-18 20:30:13 EDT (Sun, 18 May 2008)
@@ -203,7 +203,7 @@
} // namespace CG
-namespace CGS {
+namespace cgs {
typedef make_system<centimeter_base_unit,gram_base_unit,second_base_unit>::type system;
@@ -219,7 +219,7 @@
BOOST_UNITS_STATIC_CONSTANT(gram,mass);
BOOST_UNITS_STATIC_CONSTANT(second,time);
-} // namespace CGS
+} // namespace cgs
namespace esu {
@@ -295,7 +295,7 @@
using namespace boost::units;
quantity<CG::length> cg_length(1.0*CG::centimeter);
- quantity<CGS::length> cgs_length(1.0*CGS::centimeter);
+ quantity<cgs::length> cgs_length(1.0*cgs::centimeter);
std::cout << cg_length/cgs_length << std::endl;
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