![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/include/boost/icl/ |
Upload File : |
/*-----------------------------------------------------------------------------+ Copyright (c) 2008-2009: Joachim Faulhaber +------------------------------------------------------------------------------+ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENCE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +-----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ itl_rational provides adapter code for boost::rational. ------------------------------------------------------------------------------*/ #ifndef BOOST_ICL_RATIONAL_HPP_JOFA_080913 #define BOOST_ICL_RATIONAL_HPP_JOFA_080913 #include <boost/config.hpp> // For BOOST_MSVC and more #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) // conditional expression is constant #pragma warning(disable:4512) // 'boost::detail::resetter' : assignment operator could not be generated #pragma warning(disable:4800) // 'unsigned int' : forcing value to bool 'true' or 'false' (performance warning) #endif #include <boost/rational.hpp> #ifdef BOOST_MSVC #pragma warning(pop) #endif #include <boost/icl/type_traits/is_continuous.hpp> #include <boost/icl/type_traits/has_inverse.hpp> #include <boost/icl/type_traits/is_numeric.hpp> namespace boost{namespace icl { template<class Integral> struct is_numeric<boost::rational<Integral> > { typedef is_numeric type; BOOST_STATIC_CONSTANT(bool, value = true); }; template<class Integral> struct is_continuous<boost::rational<Integral> > { typedef is_continuous type; BOOST_STATIC_CONSTANT(bool, value = true); }; template<class Integral> struct is_discrete<boost::rational<Integral> > { typedef is_discrete type; BOOST_STATIC_CONSTANT(bool, value = false); }; template<class Integral> struct has_inverse<boost::rational<Integral> > { typedef has_inverse type; BOOST_STATIC_CONSTANT(bool, value = (boost::is_signed<Integral>::value)); }; }} // namespace icl boost #endif