Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:14

0001 // Boost.Units - A C++ library for zero-overhead dimensional analysis and 
0002 // unit/quantity manipulation and conversion
0003 //
0004 // Copyright (C) 2003-2008 Matthias Christian Schabel
0005 // Copyright (C) 2007-2008 Steven Watanabe
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See
0008 // accompanying file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
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