Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:40:41

0001 //  Copyright John Maddock 2006.
0002 //  Use, modification and distribution are subject to the
0003 //  Boost Software License, Version 1.0. (See accompanying file
0004 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP
0007 #define BOOST_MATH_TOOLS_REAL_CAST_HPP
0008 
0009 #include <boost/math/tools/config.hpp>
0010 
0011 #ifdef _MSC_VER
0012 #pragma once
0013 #endif
0014 
0015 namespace boost{ namespace math
0016 {
0017   namespace tools
0018   {
0019     template <class To, class T>
0020     inline constexpr To real_cast(T t) noexcept(BOOST_MATH_IS_FLOAT(T) && BOOST_MATH_IS_FLOAT(To))
0021     {
0022        return static_cast<To>(t);
0023     }
0024   } // namespace tools
0025 } // namespace math
0026 } // namespace boost
0027 
0028 #endif // BOOST_MATH_TOOLS_REAL_CAST_HPP
0029 
0030 
0031