fix doc example typo
[boost.git] / boost / units / detail / ordinal.hpp
blobb47ef67424e14e6ac680247d561406b58ad45762
1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
2 // unit/quantity manipulation and conversion
3 //
4 // Copyright (C) 2003-2008 Matthias Christian Schabel
5 // Copyright (C) 2007-2008 Steven Watanabe
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See
8 // accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
12 #define BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
14 #include <boost/mpl/less.hpp>
15 #include <boost/mpl/bool.hpp>
17 namespace boost {
18 namespace units {
20 namespace detail {
22 struct ordinal_tag {};
26 template<int N>
27 struct ordinal {
28 typedef detail::ordinal_tag tag;
29 static const long value = N;
32 template<int N>
33 const long ordinal<N>::value;
37 namespace mpl {
39 template<>
40 struct less_impl<units::detail::ordinal_tag, units::detail::ordinal_tag> {
41 template<class T1, class T2>
42 struct apply : bool_<(T1::value) < (T2::value)> {};
49 #endif