promote.hpp 755 B

1234567891011121314151617181920212223242526
  1. // Copyright 2005 Alexander Nasonov.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef FILE_boost_type_traits_promote_hpp_INCLUDED
  6. #define FILE_boost_type_traits_promote_hpp_INCLUDED
  7. #include <boost/config.hpp>
  8. #include <boost/type_traits/integral_promotion.hpp>
  9. #include <boost/type_traits/floating_point_promotion.hpp>
  10. namespace boost {
  11. template<class T> struct promote : public integral_promotion<typename floating_point_promotion<T>::type>{};
  12. #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
  13. template <class T> using promote_t = typename promote<T>::type;
  14. #endif
  15. }
  16. #endif // #ifndef FILE_boost_type_traits_promote_hpp_INCLUDED