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
16 /// \brief Get the dimension of a unit, absolute unit and quantity.
20 #include <boost/units/units_fwd.hpp>
27 struct get_dimension {};
29 /// Get the dimension of a unit.
30 template<class Dim,class System>
31 struct get_dimension< unit<Dim,System> >
36 /// Get the dimension of an absolute unit.
38 struct get_dimension< absolute<Unit> >
40 typedef typename get_dimension<Unit>::type type;
43 /// Get the dimension of a quantity.
44 template<class Unit,class Y>
45 struct get_dimension< quantity<Unit,Y> >
47 typedef typename get_dimension<Unit>::type type;
54 #endif // BOOST_UNITS_GET_DIMENSION_HPP