This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/56677] [ratio] : ratio_multiply, ratio_divide, etc results doesnt verify as __is_ratio
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Mar 2013 15:35:46 +0000
- Subject: [Bug libstdc++/56677] [ratio] : ratio_multiply, ratio_divide, etc results doesnt verify as __is_ratio
- Auto-submitted: auto-generated
- References: <bug-56677-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56677
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-21 15:35:46 UTC ---
That wouldn't help. The requirement is that the Period template argument is a
ratio. In GCC 4.7 ratio_divide is not a ratio. Whether ratio_divide::type is a
ratio or not doesn't change the fact that ratio_divide is not a ratio and
therefore not a suitable template argument for duration.
To make it work we'd also need to make duration::period a typedef for either
_Period or _Period::type and alter the two static assertions to use period not
_Period, which is doable but I'm not convinced it's worth fixing in the stable
release branch. I might look into it later.