summaryrefslogtreecommitdiff
path: root/boost/units/detail/one.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/units/detail/one.hpp')
-rw-r--r--boost/units/detail/one.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/boost/units/detail/one.hpp b/boost/units/detail/one.hpp
index 4cadc2c5fc..bf1cad902b 100644
--- a/boost/units/detail/one.hpp
+++ b/boost/units/detail/one.hpp
@@ -102,6 +102,17 @@ inline bool operator>(const boost::units::one&, const T& t) {
return(1 > t);
}
+template<class T>
+T one_to_double(const T& t) { return t; }
+
+inline double one_to_double(const one&) { return 1.0; }
+
+template<class T>
+struct one_to_double_type { typedef T type; };
+
+template<>
+struct one_to_double_type<one> { typedef double type; };
+
} // namespace units
} // namespace boost