source: NonGTP/Boost/boost/numeric/interval/detail/c99_rounding_control.hpp @ 857

Revision 857, 1.2 KB checked in by igarcia, 19 years ago (diff)
Line 
1/* Boost interval/detail/c99_rounding_control.hpp file
2 *
3 * Copyright 2000 Jens Maurer
4 * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
5 *
6 * Distributed under the Boost Software License, Version 1.0.
7 * (See accompanying file LICENSE_1_0.txt or
8 * copy at http://www.boost.org/LICENSE_1_0.txt)
9 */
10
11#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
12#define BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
13
14#include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
15
16namespace boost {
17namespace numeric {
18namespace interval_lib {
19namespace detail {
20
21struct c99_rounding_control: c99_rounding
22{
23  template<class T>
24  static T force_rounding(const T& r) { volatile T r_ = r; return r_; }
25};
26
27} // namespace detail
28
29template<>
30struct rounding_control<float>:
31  detail::c99_rounding_control { };
32
33template<>
34struct rounding_control<double>:
35  detail::c99_rounding_control { };
36
37template<>
38struct rounding_control<long double>:
39  detail::c99_rounding_control { };
40
41} // namespace interval_lib
42} // namespace numeric
43} // namespace boost
44
45#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
46
47#endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
Note: See TracBrowser for help on using the repository browser.