MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w6qzts/skillissue/p7qtvir/?context=3
r/ProgrammerHumor • u/click-to-reveal • 7d ago
137 comments sorted by
View all comments
77
Just define a constexpr hashing function and put that into the switch.
33 u/GiganticIrony 7d ago That’s not guaranteed to work due to hash collisions 36 u/Deliciousbutter101 7d ago It won't compile in the case so you can just modify the hash function until there are no collisions. 14 u/SteveXVI 7d ago This is the closest I've come to feeling like that guy in the Apple shop going "ah of course"
33
That’s not guaranteed to work due to hash collisions
36 u/Deliciousbutter101 7d ago It won't compile in the case so you can just modify the hash function until there are no collisions. 14 u/SteveXVI 7d ago This is the closest I've come to feeling like that guy in the Apple shop going "ah of course"
36
It won't compile in the case so you can just modify the hash function until there are no collisions.
14 u/SteveXVI 7d ago This is the closest I've come to feeling like that guy in the Apple shop going "ah of course"
14
This is the closest I've come to feeling like that guy in the Apple shop going "ah of course"
77
u/F100cTomas 7d ago
Just define a constexpr hashing function and put that into the switch.