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]

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


Hi,

> Attached is a patch that short-cuts ratio_less when denominators
> are equal or signs differ. This prevents overflow in a few cases
> (test case provided).

Ok.


> Also, I added some doxygen documentation to std::ratio class.
> However, when I built the documentation (html) it didn't look like it
> was picking up the header. Does something need modification for
> doxygen to pick it up.

Let's ask Benjamin...

I'm committing the below, which avoids in <ratio> the use of the various limit macros, which, according to C99, in C++ are not defined in <stdint.h> when __STDC_LIMIT_MACROS is not defined. In fact we have a problem here, because, in C++0x, the availability of those limit macros in <cstdint> is supposed to be *independent* of the feature macro to be defined and since our <cstdint> includes <stdint.h> it suffices that the user includes once the latter without defining the feature macro for the following inclusion of <cstdint> to become a NOP, thus the limit macros remain forever unavailable... grunt. In fact this requirement in C++0x seems to me largely contrary to the resolution of DR 456, I have to study the issue a little more...

Attachment: Changelog_ratio_less.txt
Description: Text document

Attachment: patch_ratio_less.txt
Description: Text document


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