File indexing completed on 2025-01-18 09:53:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_UNITS_DIM_IMPL_HPP
0012 #define BOOST_UNITS_DIM_IMPL_HPP
0013
0014 #include <boost/mpl/bool.hpp>
0015 #include <boost/mpl/less.hpp>
0016
0017 #include <boost/units/units_fwd.hpp>
0018
0019
0020
0021
0022 namespace boost {
0023
0024 namespace units {
0025
0026 namespace detail {
0027
0028 struct dim_tag;
0029
0030 }
0031
0032 }
0033
0034 namespace mpl {
0035
0036
0037 template<>
0038 struct less_impl<boost::units::detail::dim_tag, boost::units::detail::dim_tag>
0039 {
0040 template<class T0, class T1>
0041 struct apply : mpl::less<typename T0::tag_type, typename T1::tag_type> {};
0042 };
0043
0044 }
0045
0046 namespace units {
0047
0048 template<class Tag, class Exponent>
0049 struct dim;
0050
0051 template<long N, long D>
0052 class static_rational;
0053
0054 namespace detail {
0055
0056
0057 template<typename T>
0058 struct get_tag
0059 {
0060 typedef typename T::tag_type type;
0061 };
0062
0063
0064 template<typename T>
0065 struct get_value
0066 {
0067 typedef typename T::value_type type;
0068 };
0069
0070
0071 template<class T>
0072 struct is_empty_dim;
0073
0074 template<typename T>
0075 struct is_empty_dim< dim<T, static_rational<0, 1> > > :
0076 mpl::true_
0077 { };
0078
0079 template<typename T, typename V>
0080 struct is_empty_dim< dim<T, V> > :
0081 mpl::false_
0082 { };
0083
0084 }
0085
0086 }
0087
0088 }
0089
0090 #endif