This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] c++0x std::ratio implementation


I'm assuming std::ratio has been accepted which could very well be
wrong. If it has (or good chance it will be) then I've attached an
implmentation based off of N2615 (
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2615.html#ratio
). One notable issue is std::ratio_less. I've just left the naive
impl. but I think I have a way that avoids overflow using the
coefficients of the continued fraction representation. Still trying to
nail down the algorithm. Any thoughts/suggestions/concerns welcome.

Chris

Attachment: patch_ratio.txt
Description: Text document

Attachment: Changelog_ratio.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]