File indexing completed on 2025-01-18 09:38:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef BOOST_ICL_RATIONAL_HPP_JOFA_080913
0014 #define BOOST_ICL_RATIONAL_HPP_JOFA_080913
0015
0016 #include <boost/config.hpp> // For BOOST_MSVC and more
0017
0018 #ifdef BOOST_MSVC
0019 #pragma warning(push)
0020 #pragma warning(disable:4127)
0021 #pragma warning(disable:4512)
0022 #pragma warning(disable:4800)
0023 #endif
0024
0025 #include <boost/rational.hpp>
0026
0027 #ifdef BOOST_MSVC
0028 #pragma warning(pop)
0029 #endif
0030
0031 #include <boost/icl/type_traits/is_continuous.hpp>
0032 #include <boost/icl/type_traits/has_inverse.hpp>
0033 #include <boost/icl/type_traits/is_numeric.hpp>
0034
0035 namespace boost{namespace icl
0036 {
0037 template<class Integral>
0038 struct is_numeric<boost::rational<Integral> >
0039 {
0040 typedef is_numeric type;
0041 BOOST_STATIC_CONSTANT(bool, value = true);
0042 };
0043
0044 template<class Integral>
0045 struct is_continuous<boost::rational<Integral> >
0046 {
0047 typedef is_continuous type;
0048 BOOST_STATIC_CONSTANT(bool, value = true);
0049 };
0050
0051 template<class Integral>
0052 struct is_discrete<boost::rational<Integral> >
0053 {
0054 typedef is_discrete type;
0055 BOOST_STATIC_CONSTANT(bool, value = false);
0056 };
0057
0058 template<class Integral>
0059 struct has_inverse<boost::rational<Integral> >
0060 {
0061 typedef has_inverse type;
0062 BOOST_STATIC_CONSTANT(bool, value = (boost::is_signed<Integral>::value));
0063 };
0064
0065 }}
0066
0067
0068 #endif
0069
0070