Boost logo

Boost-Commit :

From: matthiasschabel_at_[hidden]
Date: 2007-05-30 19:23:38


Author: matthiasschabel
Date: 2007-05-30 19:23:38 EDT (Wed, 30 May 2007)
New Revision: 4374
URL: http://svn.boost.org/trac/boost/changeset/4374

Log:
make CODATA constants more granular

Text files modified:
   sandbox/units/libs/units/example/unit_example_19.cpp | 2 +-
   sandbox/units/libs/units/example/unit_example_4.cpp | 12 ++++++------
   2 files changed, 7 insertions(+), 7 deletions(-)

Modified: sandbox/units/libs/units/example/unit_example_19.cpp
==============================================================================
--- sandbox/units/libs/units/example/unit_example_19.cpp (original)
+++ sandbox/units/libs/units/example/unit_example_19.cpp 2007-05-30 19:23:38 EDT (Wed, 30 May 2007)
@@ -233,7 +233,7 @@
 
 #include <boost/units/io.hpp>
 //#include <boost/units/systems/si.hpp>
-#include <boost/units/systems/si/constants.hpp>
+#include <boost/units/systems/si/codata_constants.hpp>
 
 #if BOOST_UNITS_HAS_TYPEOF
 

Modified: sandbox/units/libs/units/example/unit_example_4.cpp
==============================================================================
--- sandbox/units/libs/units/example/unit_example_4.cpp (original)
+++ sandbox/units/libs/units/example/unit_example_4.cpp 2007-05-30 19:23:38 EDT (Wed, 30 May 2007)
@@ -157,7 +157,7 @@
 /// sin takes a quantity and returns a dimensionless quantity
 template<class System,class Y>
 quantity<unit<dimensionless_type,System>,Y>
-sin(const quantity<unit<plane_angle_type,System>,Y>& theta)
+sin(const quantity<unit<plane_angle_dim,System>,Y>& theta)
 {
     return quantity<unit<dimensionless_type,System>,Y>(std::sin(theta.value()));
 }
@@ -166,10 +166,10 @@
 //[unit_example_4_function_snippet_2
 /// asin takes a dimensionless quantity and returns a quantity
 template<class System,class Y>
-quantity<unit<plane_angle_type,System>,Y>
+quantity<unit<plane_angle_dim,System>,Y>
 asin(const quantity<unit<dimensionless_type,System>,Y>& val)
 {
- typedef quantity<unit<plane_angle_type,System>,Y> quantity_type;
+ typedef quantity<unit<plane_angle_dim,System>,Y> quantity_type;
     
     return quantity_type::from_value(std::asin(val.value()));
 }
@@ -179,9 +179,9 @@
 //[unit_example_4_function_snippet_3
 /// the physical definition of work - computed for an arbitrary unit system
 template<class System,class Y>
-quantity<unit<energy_type,System>,Y>
-work(quantity<unit<force_type,System>,Y> F,
- quantity<unit<length_type,System>,Y> dx)
+quantity<unit<energy_dim,System>,Y>
+work(quantity<unit<force_dim,System>,Y> F,
+ quantity<unit<length_dim,System>,Y> dx)
 {
     return F*dx;
 }


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