llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

`<ratio>`: The `std::ratio` meta arithmetic can accept non-`std::ratio`

Open hewillk opened this issue 3 years ago • 3 comments

[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."

Only MSVC-STL triggers the static assertion for the following test:

#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

hewillk avatar Jul 08 '23 11:07 hewillk

Is anyone working on this issue ? I'd like to try my hands on it ( I am beginner in the LLVM community , any help and guidance would be apreciated)

Shanchax avatar Jul 09 '23 06:07 Shanchax

Since the issue is new, I don't expect anybody to have started on it. Best join us in the #libcxx channel on LLVM Discord. We have documentation and Contribution information.

mordante avatar Jul 09 '23 12:07 mordante

@Shanchax are you still working on this issue?

mordante avatar Dec 30 '23 18:12 mordante