Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/units/is_dimensionless.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_IS_DIMENSIONLESS_HPP
0012 #define BOOST_UNITS_IS_DIMENSIONLESS_HPP
0013 
0014 ///
0015 /// \file
0016 /// \brief Check if a unit or quantity is dimensionless.
0017 ///
0018 
0019 #include <boost/mpl/bool.hpp>
0020 #include <boost/units/units_fwd.hpp>
0021 
0022 namespace boost {
0023 
0024 namespace units {
0025 
0026 template<class T>
0027 struct is_dimensionless :
0028     public mpl::false_
0029 { };
0030 
0031 /// Check if a unit is dimensionless.
0032 template<class System>
0033 struct is_dimensionless< unit<dimensionless_type,System> > :
0034     public mpl::true_
0035 { };
0036 
0037 /// Check if a quantity is dimensionless.
0038 template<class Unit,class Y>
0039 struct is_dimensionless< quantity<Unit,Y> > :
0040     public is_dimensionless<Unit>
0041 { };
0042 
0043 } // namespace units
0044 
0045 } // namespace boost
0046 
0047 #endif // BOOST_UNITS_IS_DIMENSIONLESS_HPP