1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
2 // unit/quantity manipulation and conversion
4 // Copyright (C) 2003-2008 Matthias Christian Schabel
5 // Copyright (C) 2008 Steven Watanabe
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_GET_DIMENSION_HPP
12 #define BOOST_UNITS_GET_DIMENSION_HPP
14 #include <boost/units/units_fwd.hpp>
21 struct get_dimension
{};
23 /// get the dimension of a unit
24 template<class Dim
,class System
>
25 struct get_dimension
< unit
<Dim
,System
> >
30 /// get the dimension of an absolute unit
32 struct get_dimension
< absolute
<Unit
> >
34 typedef typename get_dimension
<Unit
>::type type
;
37 /// get the dimension of a quantity
38 template<class Unit
,class Y
>
39 struct get_dimension
< quantity
<Unit
,Y
> >
41 typedef typename get_dimension
<Unit
>::type type
;
48 #endif // BOOST_UNITS_GET_DIMENSION_HPP