From a7443a2dd6d766cfe829d89b62e3aeb6a490fc50 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 2 Mar 2011 15:06:00 +0000 Subject: [PATCH] ratio (ratio_less): Add comments. 2011-03-02 Marc Glisse * include/std/ratio (ratio_less): Add comments. From-SVN: r170617 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/include/std/ratio | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c2c86d6caea..66786f4e22b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2011-03-02 Marc Glisse + + * include/std/ratio (ratio_less): Add comments. + 2011-03-02 Marc Glisse PR libstdc++/47913 diff --git a/libstdc++-v3/include/std/ratio b/libstdc++-v3/include/std/ratio index 30bce162e16..17d28a10f46 100644 --- a/libstdc++-v3/include/std/ratio +++ b/libstdc++-v3/include/std/ratio @@ -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 struct __ratio_less_impl_2; // _Ri > 0 + // Compare the integral parts, and remove them if they are equal template struct __ratio_less_impl_1 @@ -338,6 +341,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; /// ratio_less + // using a continued fraction expansion template struct ratio_less : __ratio_less_impl<_R1, _R2>::type -- 2.30.2