File indexing completed on 2025-01-30 09:49:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_NUMERIC_INTERVAL_POLICIES_HPP
0011 #define BOOST_NUMERIC_INTERVAL_POLICIES_HPP
0012
0013 #include <boost/numeric/interval/interval.hpp>
0014
0015 namespace boost {
0016 namespace numeric {
0017 namespace interval_lib {
0018
0019
0020
0021
0022
0023 template<class Rounding, class Checking>
0024 struct policies
0025 {
0026 typedef Rounding rounding;
0027 typedef Checking checking;
0028 };
0029
0030
0031
0032
0033
0034 template<class OldInterval, class NewRounding>
0035 class change_rounding
0036 {
0037 typedef typename OldInterval::base_type T;
0038 typedef typename OldInterval::traits_type p;
0039 typedef typename p::checking checking;
0040 public:
0041 typedef interval<T, policies<NewRounding, checking> > type;
0042 };
0043
0044 template<class OldInterval, class NewChecking>
0045 class change_checking
0046 {
0047 typedef typename OldInterval::base_type T;
0048 typedef typename OldInterval::traits_type p;
0049 typedef typename p::rounding rounding;
0050 public:
0051 typedef interval<T, policies<rounding, NewChecking> > type;
0052 };
0053
0054
0055
0056
0057
0058
0059 template<class OldInterval>
0060 class unprotect
0061 {
0062 typedef typename OldInterval::base_type T;
0063 typedef typename OldInterval::traits_type p;
0064 typedef typename p::rounding r;
0065 typedef typename r::unprotected_rounding newRounding;
0066 public:
0067 typedef typename change_rounding<OldInterval, newRounding>::type type;
0068 };
0069
0070 }
0071 }
0072 }
0073
0074
0075 #endif