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.