Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
craftit
on Dec 25, 2023
|
parent
|
context
|
favorite
| on:
The C++20 Naughty and Nice List for Game Devs
It saves writing lots of boilerplate. If you implement it for a type, you automatically get: <, >, <=, >=, ==, !=
mysterydip
on Dec 25, 2023
[–]
Ah that makes sense, thanks! Then you can just do normal comparisons on the integer value of < > or == to 0.
wkennington
on Dec 26, 2023
|
parent
[–]
It also makes implementing all those operators easier for similar objects as you don’t need to plumb 6 different routines.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: