Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nly
6 months ago
|
parent
|
context
|
favorite
| on:
Compiler Bug Causes Compiler Bug: How a 12-Year-Ol...
Seems like the free comparison function in boost rational should have been constrained to non-rationals
i.e. !is_same_v<rational, U>
ethan_smith
6 months ago
[–]
The constraint should be `template <typename T> requires (!std::is_same_v<T, rational<>>)` since the spaceship operator's rewriting rules for mixed-type comparisons create the ambiguity that triggered the compiler bug.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
i.e. !is_same_v<rational, U>