is_dimensionless_unit.hpp 905 B

12345678910111213141516171819202122232425262728293031323334
  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_DIMENSIONLESS_UNIT_HPP
  11. #define BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP
  12. /// \file
  13. /// \brief Check that a type is a dimensionless unit.
  14. #include <boost/units/is_unit_of_dimension.hpp>
  15. #include <boost/units/units_fwd.hpp>
  16. namespace boost {
  17. namespace units {
  18. /// Check that a type is a dimensionless unit.
  19. template<class T>
  20. struct is_dimensionless_unit :
  21. public is_unit_of_dimension<T,dimensionless_type>
  22. { };
  23. } // namespace units
  24. } // namespace boost
  25. #endif // BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP