File indexing completed on 2025-01-18 09:53:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
0012 #define BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
0013
0014 #include <boost/mpl/less.hpp>
0015 #include <boost/mpl/bool.hpp>
0016
0017 namespace boost {
0018 namespace units {
0019
0020 namespace detail {
0021
0022 struct ordinal_tag {};
0023
0024 }
0025
0026 template<int N>
0027 struct ordinal {
0028 typedef detail::ordinal_tag tag;
0029 BOOST_STATIC_CONSTEXPR long value = N;
0030 };
0031
0032 template<int N>
0033 BOOST_CONSTEXPR_OR_CONST long ordinal<N>::value;
0034
0035 }
0036
0037 namespace mpl {
0038
0039 template<>
0040 struct less_impl<units::detail::ordinal_tag, units::detail::ordinal_tag> {
0041 template<class T1, class T2>
0042 struct apply : bool_<(T1::value) < (T2::value)> {};
0043 };
0044
0045 }
0046
0047 }
0048
0049 #endif