Warning, file /include/boost/numeric/interval/ext/integer.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP
0011 #define BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP
0012
0013 #include <boost/numeric/interval/detail/interval_prototype.hpp>
0014 #include <boost/numeric/interval/detail/test_input.hpp>
0015
0016 namespace boost {
0017 namespace numeric {
0018
0019 template<class T, class Policies> inline
0020 interval<T, Policies> operator+ (const interval<T, Policies>& x, int y)
0021 {
0022 return x + static_cast<T>(y);
0023 }
0024
0025 template<class T, class Policies> inline
0026 interval<T, Policies> operator+ (int x, const interval<T, Policies>& y)
0027 {
0028 return static_cast<T>(x) + y;
0029 }
0030
0031 template<class T, class Policies> inline
0032 interval<T, Policies> operator- (const interval<T, Policies>& x, int y)
0033 {
0034 return x - static_cast<T>(y);
0035 }
0036
0037 template<class T, class Policies> inline
0038 interval<T, Policies> operator- (int x, const interval<T, Policies>& y)
0039 {
0040 return static_cast<T>(x) - y;
0041 }
0042
0043 template<class T, class Policies> inline
0044 interval<T, Policies> operator* (const interval<T, Policies>& x, int y)
0045 {
0046 return x * static_cast<T>(y);
0047 }
0048
0049 template<class T, class Policies> inline
0050 interval<T, Policies> operator* (int x, const interval<T, Policies>& y)
0051 {
0052 return static_cast<T>(x) * y;
0053 }
0054
0055 template<class T, class Policies> inline
0056 interval<T, Policies> operator/ (const interval<T, Policies>& x, int y)
0057 {
0058 return x / static_cast<T>(y);
0059 }
0060
0061 template<class T, class Policies> inline
0062 interval<T, Policies> operator/ (int x, const interval<T, Policies>& y)
0063 {
0064 return static_cast<T>(x) / y;
0065 }
0066
0067 }
0068 }
0069
0070 #endif