ratio (ratio_less): Add comments.
2011-03-02 Marc Glisse <marc.glisse@normalesup.org> * include/std/ratio (ratio_less): Add comments. From-SVN: r170617
This commit is contained in:
parent
8fddbce4ab
commit
a7443a2dd6
@ -1,3 +1,7 @@
|
||||
2011-03-02 Marc Glisse <marc.glisse@normalesup.org>
|
||||
|
||||
* include/std/ratio (ratio_less): Add comments.
|
||||
|
||||
2011-03-02 Marc Glisse <marc.glisse@normalesup.org>
|
||||
|
||||
PR libstdc++/47913
|
||||
|
@ -279,10 +279,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
{ };
|
||||
|
||||
// 0 <= _Ri < 1
|
||||
// If one is 0, conclude
|
||||
// Otherwise, x < y iff 1/y < 1/x
|
||||
template<typename _R1, typename _R2>
|
||||
struct __ratio_less_impl_2;
|
||||
|
||||
// _Ri > 0
|
||||
// Compare the integral parts, and remove them if they are equal
|
||||
template<typename _R1, typename _R2, intmax_t __q1 = _R1::num / _R1::den,
|
||||
intmax_t __q2 = _R2::num / _R2::den, bool __eq = (__q1 == __q2)>
|
||||
struct __ratio_less_impl_1
|
||||
@ -338,6 +341,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
{ };
|
||||
|
||||
/// ratio_less
|
||||
// using a continued fraction expansion
|
||||
template<typename _R1, typename _R2>
|
||||
struct ratio_less
|
||||
: __ratio_less_impl<_R1, _R2>::type
|
||||
|
Loading…
Reference in New Issue
Block a user