Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5724: "0 + 0" and "0 - 0" lead to a compile time error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-20 11:12:59
#5724: "0 + 0" and "0 - 0" lead to a compile time error
------------------------------------------------+---------------------------
Reporter: iorate <iorate_stage@â¦> | Owner: viboes
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: ratio
Version: Boost 1.47.0 | Severity: Problem
Resolution: fixed | Keywords:
------------------------------------------------+---------------------------
Comment (by iorate <iorate_stage@â¦>):
The solution doesn't work with ratio<0, 2> and so on, I think.
The following is better:
{{{
template <class R, boost::intmax_t D> struct ratio_add<R, ratio<0, D> > {
typedef R type;
};
template <class R, boost::intmax_t D> struct ratio_subtract<R, ratio<0, D>
> {
typedef R type;
};
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5724#comment:5> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC