12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
- #define BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
- #include <boost/mpl/less.hpp>
- #include <boost/mpl/bool.hpp>
- namespace boost {
- namespace units {
- namespace detail {
- struct ordinal_tag {};
- }
- template<int N>
- struct ordinal {
- typedef detail::ordinal_tag tag;
- BOOST_STATIC_CONSTEXPR long value = N;
- };
- template<int N>
- BOOST_CONSTEXPR_OR_CONST long ordinal<N>::value;
- }
- namespace mpl {
- template<>
- struct less_impl<units::detail::ordinal_tag, units::detail::ordinal_tag> {
- template<class T1, class T2>
- struct apply : bool_<(T1::value) < (T2::value)> {};
- };
- }
- }
- #endif
|