Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.


// Copyright 2005 Alexander Nasonov.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at

#ifndef FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED
#define FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED

#include <boost/config.hpp>

namespace boost {

   template<class T> struct floating_point_promotion { typedef T type; };
   template<> struct floating_point_promotion<float> { typedef double type; };
   template<> struct floating_point_promotion<float const> { typedef double const type; };
   template<> struct floating_point_promotion<float volatile>{ typedef double volatile type; };
   template<> struct floating_point_promotion<float const volatile> { typedef double const volatile type; };


   template <class T> using floating_point_promotion_t = typename floating_point_promotion<T>::type;



#endif // #ifndef FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED