public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/110593] New: The std::ratio meta arithmetic can accept non-std::ratio
@ 2023-07-08  5:01 hewillk at gmail dot com
  2023-07-08  7:20 ` [Bug libstdc++/110593] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hewillk at gmail dot com @ 2023-07-08  5:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110593

            Bug ID: 110593
           Summary: The std::ratio meta arithmetic can accept
                    non-std::ratio
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

[ratio.general]: "If a template parameter is named R1 or R2, and the template
argument is not a specialization of the ratio template, the program is
ill-formed."

So for the following libstdc++ needs to be diagnosed, right?

#include <ratio>

struct Ratio { constexpr static double num = 0, den = 1; };
static_assert(std::ratio_equal<Ratio, std::ratio<0, 5>>());

https://godbolt.org/z/MhazY5ecn

Only MSVC-STL triggers the static assertion.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-18 14:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-08  5:01 [Bug libstdc++/110593] New: The std::ratio meta arithmetic can accept non-std::ratio hewillk at gmail dot com
2023-07-08  7:20 ` [Bug libstdc++/110593] " redi at gcc dot gnu.org
2023-07-19 18:23 ` redi at gcc dot gnu.org
2023-07-19 22:43 ` cvs-commit at gcc dot gnu.org
2023-07-19 23:33 ` redi at gcc dot gnu.org
2023-07-28 17:32 ` cvs-commit at gcc dot gnu.org
2024-03-18 14:04 ` cvs-commit at gcc dot gnu.org
2024-03-18 14:11 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).