fix doc example typo
[boost.git] / boost / units / get_system.hpp
blob9e5bd5e9ebfad7d2bc0520602133aa3979150682
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) 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_GET_SYSTEM_HPP
12 #define BOOST_UNITS_GET_SYSTEM_HPP
14 #include <boost/units/units_fwd.hpp>
16 namespace boost {
18 namespace units {
20 template<class T>
21 struct get_system {};
23 /// get the system of a unit
24 template<class Dim,class System>
25 struct get_system< unit<Dim,System> >
27 typedef System type;
30 /// get the system of an absolute unit
31 template<class Unit>
32 struct get_system< absolute<Unit> >
34 typedef typename get_system<Unit>::type type;
37 /// get the system of a quantity
38 template<class Unit,class Y>
39 struct get_system< quantity<Unit,Y> >
41 typedef typename get_system<Unit>::type type;
44 } // namespace units
46 } // namespace boost
48 #endif // BOOST_UNITS_GET_SYSTEM_HPP