reduce_unit.hpp 868 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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) 2007-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_REDUCE_UNIT_HPP_INCLUDED
  11. #define BOOST_UNITS_REDUCE_UNIT_HPP_INCLUDED
  12. /// \file
  13. /// \brief Returns a unique type for every unit.
  14. namespace boost {
  15. namespace units {
  16. #ifdef BOOST_UNITS_DOXYGEN
  17. /// Returns a unique type for every unit.
  18. template<class Unit>
  19. struct reduce_unit {
  20. typedef detail::unspecified type;
  21. };
  22. #else
  23. // default implementation: return Unit unchanged.
  24. template<class Unit>
  25. struct reduce_unit {
  26. typedef Unit type;
  27. };
  28. #endif
  29. }
  30. }
  31. #endif