Chris@16: /* Boost interval/detail/c99_rounding_control.hpp file Chris@16: * Chris@16: * Copyright 2000 Jens Maurer Chris@16: * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion Chris@16: * Chris@16: * Distributed under the Boost Software License, Version 1.0. Chris@16: * (See accompanying file LICENSE_1_0.txt or Chris@16: * copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: */ Chris@16: Chris@16: #ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP Chris@16: #define BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace numeric { Chris@16: namespace interval_lib { Chris@16: Chris@16: template<> Chris@16: struct rounding_control: Chris@16: detail::c99_rounding_control Chris@16: { Chris@16: static float force_rounding(float const &r) Chris@16: { volatile float r_ = r; return r_; } Chris@16: }; Chris@16: Chris@16: template<> Chris@16: struct rounding_control: Chris@16: detail::c99_rounding_control Chris@16: { Chris@16: static double force_rounding(double const &r) Chris@16: { volatile double r_ = r; return r_; } Chris@16: }; Chris@16: Chris@16: template<> Chris@16: struct rounding_control: Chris@16: detail::c99_rounding_control Chris@16: { Chris@16: static long double force_rounding(long double const &r) Chris@16: { volatile long double r_ = r; return r_; } Chris@16: }; Chris@16: Chris@16: } // namespace interval_lib Chris@16: } // namespace numeric Chris@16: } // namespace boost Chris@16: Chris@16: #undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE Chris@16: Chris@16: #endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP