Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/units/get_system.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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) 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_GET_SYSTEM_HPP
0012 #define BOOST_UNITS_GET_SYSTEM_HPP
0013 
0014 /// \file
0015 /// \brief Get the system of a unit, absolute unit or quantity.
0016 
0017 #include <boost/units/units_fwd.hpp>
0018 
0019 namespace boost {
0020 
0021 namespace units {
0022 
0023 template<class T>
0024 struct get_system {};
0025 
0026 /// Get the system of a unit.
0027 template<class Dim,class System>
0028 struct get_system< unit<Dim,System> >
0029 {
0030     typedef System type;
0031 };
0032 
0033 /// Get the system of an absolute unit.
0034 template<class Unit>
0035 struct get_system< absolute<Unit> >
0036 {
0037     typedef typename get_system<Unit>::type type;
0038 };
0039 
0040 /// Get the system of a quantity.
0041 template<class Unit,class Y>
0042 struct get_system< quantity<Unit,Y> >
0043 {
0044     typedef typename get_system<Unit>::type     type;
0045 };
0046 
0047 } // namespace units
0048 
0049 } // namespace boost
0050 
0051 #endif // BOOST_UNITS_GET_SYSTEM_HPP