is_quantity_of_dimension.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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)
  10. #ifndef BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP
  11. #define BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP
  12. ///
  13. /// \file
  14. /// \brief Check that a type is a quantity of the specified dimension.
  15. ///
  16. #include <boost/mpl/bool.hpp>
  17. #include <boost/units/units_fwd.hpp>
  18. #include <boost/units/is_unit_of_dimension.hpp>
  19. namespace boost {
  20. namespace units {
  21. /// Check that a type is a quantity of the specified dimension.
  22. template<class T,class Dim>
  23. struct is_quantity_of_dimension :
  24. public mpl::false_
  25. { };
  26. template<class Unit,class Y,class Dim>
  27. struct is_quantity_of_dimension< quantity< Unit,Y>,Dim > :
  28. public is_unit_of_dimension<Unit, Dim>
  29. { };
  30. } // namespace units
  31. } // namespace boost
  32. #endif // BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP