extract_exponent_type.hpp 737 B

12345678910111213141516171819202122232425262728
  1. ///////////////////////////////////////////////////////////////
  2. // Copyright 2012 John Maddock. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
  5. #ifndef BOOST_MATH_EXTRACT_EXPONENT_HPP
  6. #define BOOST_MATH_EXTRACT_EXPONENT_HPP
  7. #include <boost/multiprecision/number.hpp>
  8. namespace boost {
  9. namespace multiprecision {
  10. namespace backends {
  11. template <class Backend, int cat>
  12. struct extract_exponent_type
  13. {
  14. typedef int type;
  15. };
  16. template <class Backend>
  17. struct extract_exponent_type<Backend, number_kind_floating_point>
  18. {
  19. typedef typename Backend::exponent_type type;
  20. };
  21. }}} // namespace boost::multiprecision::backends
  22. #endif