Update contrib.
1 /* Boost interval/policies.hpp template implementation file
3 * Copyright 2003 Guillaume Melquiond
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE_1_0.txt or
7 * copy at http://www.boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_NUMERIC_INTERVAL_POLICIES_HPP
11 #define BOOST_NUMERIC_INTERVAL_POLICIES_HPP
13 #include <boost/numeric/interval/interval.hpp>
17 namespace interval_lib {
23 template<class Rounding, class Checking>
26 typedef Rounding rounding;
27 typedef Checking checking;
31 * policies switching classes
34 template<class OldInterval, class NewRounding>
37 typedef typename OldInterval::base_type T;
38 typedef typename OldInterval::traits_type p;
39 typedef typename p::checking checking;
41 typedef interval<T, policies<NewRounding, checking> > type;
44 template<class OldInterval, class NewChecking>
47 typedef typename OldInterval::base_type T;
48 typedef typename OldInterval::traits_type p;
49 typedef typename p::rounding rounding;
51 typedef interval<T, policies<rounding, NewChecking> > type;
55 * Protect / unprotect: control whether the rounding mode is set/reset
56 * at each operation, rather than once and for all.
59 template<class OldInterval>
62 typedef typename OldInterval::base_type T;
63 typedef typename OldInterval::traits_type p;
64 typedef typename p::rounding r;
65 typedef typename r::unprotected_rounding newRounding;
67 typedef typename change_rounding<OldInterval, newRounding>::type type;
70 } // namespace interval_lib
71 } // namespace numeric
75 #endif // BOOST_NUMERIC_INTERVAL_POLICIES_HPP