This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Resolve libstdc++/58850


Hi,

strictly speaking this isn't a bug, is more a QoI issue, but it shows that the current minutes and hours typedefs we have got in <chrono>, while strictly speaking conforming, lead to "surprises":

    /// minutes typedef duration<int, ratio< 60>> minutes;
    /// hours typedef duration<int, ratio<3600>> hours;

that is, somewhat arbitrarily, while use int instead of int64_t, like we do for the others (for seconds, etc), only because on many targets, by no mean all, an int is typically 32 bits, thus the Standard requirements are fulfilled (it talks about at least 29 bits and at least 23 bits, respectively). Let's just use int64_t for all of them.

Tested x86_64-linux.

Thanks,
Paolo.

/////////////////////////////


Attachment: CL_58850
Description: Text document

Attachment: patch_58850
Description: Text document


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