|
Boost-Commit : |
From: steven_at_[hidden]
Date: 2007-08-27 18:13:12
Author: steven_watanabe
Date: 2007-08-27 18:13:12 EDT (Mon, 27 Aug 2007)
New Revision: 39024
URL: http://svn.boost.org/trac/boost/changeset/39024
Log:
Update dimensionless functions in cmath.hpp
Text files modified:
sandbox/units/boost/units/cmath.hpp | 26 +++++++++++++-------------
sandbox/units/libs/units/test/Jamfile.v2 | 1 +
2 files changed, 14 insertions(+), 13 deletions(-)
Modified: sandbox/units/boost/units/cmath.hpp
==============================================================================
--- sandbox/units/boost/units/cmath.hpp (original)
+++ sandbox/units/boost/units/cmath.hpp 2007-08-27 18:13:12 EDT (Mon, 27 Aug 2007)
@@ -432,25 +432,25 @@
/// and roots can be computed by @c pow<Ex> and @c root<Rt> respectively.
template<class S, class Y>
inline
-quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>
-pow(const quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>& q1,
- const quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>& q2)
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+pow(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q1,
+ const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q2)
{
using std::pow;
- typedef quantity<unit<dimensionless_type, homogeneous_system<S> >,Y> quantity_type;
+ typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S),Y> quantity_type;
return quantity_type::from_value(pow(q1.value(), q2.value()));
}
template<class S, class Y>
inline
-quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>
-exp(const quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>& q)
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+exp(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q)
{
using std::exp;
- typedef quantity<unit<dimensionless_type, homogeneous_system<S> >, Y> quantity_type;
+ typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> quantity_type;
return quantity_type::from_value(exp(q.value()));
}
@@ -469,24 +469,24 @@
template<class S, class Y>
inline
-quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>
-log(const quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>& q)
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+log(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q)
{
using std::log;
- typedef quantity<unit<dimensionless_type, homogeneous_system<S> >, Y> quantity_type;
+ typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> quantity_type;
return quantity_type::from_value(log(q.value()));
}
template<class S, class Y>
inline
-quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>
-log10(const quantity<unit<dimensionless_type, homogeneous_system<S> >, Y>& q)
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+log10(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q)
{
using std::log10;
- typedef quantity<unit<dimensionless_type, homogeneous_system<S> >, Y> quantity_type;
+ typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> quantity_type;
return quantity_type::from_value(log10(q.value()));
}
Modified: sandbox/units/libs/units/test/Jamfile.v2
==============================================================================
--- sandbox/units/libs/units/test/Jamfile.v2 (original)
+++ sandbox/units/libs/units/test/Jamfile.v2 2007-08-27 18:13:12 EDT (Mon, 27 Aug 2007)
@@ -26,6 +26,7 @@
[ run test_base_dimension.cpp : : : : ]
[ run test_absolute.cpp : : : : ]
[ run test_default_conversion.cpp : : : : ]
+ [ run test_cmath.cpp : : : : ]
[ compile-fail fail_implicit_conversion.cpp : : ]
[ compile-fail fail_quantity_construct.cpp : : ]
[ compile-fail fail_quantity_assign.cpp : : ]
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