Closed nozomirin closed 11 months ago
Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.
Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.
I know why it is not right now. The behavior of the modulo operation in c++ is not the same as python. I'm sorry for the disturbance.
Great to hear that you could solve the problem.
For anybody else: I think the reason why the tests do time out is that in this solution the operator==
and operator!=
cannot be called with const
objects. But our testing framework Catch2 does some complex meta-programming magic and the evaluation of REQUIRE(clock1 == clock2);
and REQUIRE(clock1 != clock2);
causes lots and lots of error messages, too many for our test runner to handle.
Both const for parameter and for function are necessary. It takes me so much time...
This is my solution.
When I ran tests, it timed out. I tried to comment out these member functions, and I found the at function is the problem. But it seems that there is nothing special in this static member function (I searched other people's solutions and can't find something useful. I even copied someone's code and it just worked. I also paste them in godbolt.org and it compiled.)
Please forgive me if I miss something stupid.