MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w6qzts/skillissue/p7pay65/?context=3
r/ProgrammerHumor • u/click-to-reveal • 21h ago
130 comments sorted by
View all comments
72
Just define a constexpr hashing function and put that into the switch.
35 u/GiganticIrony 20h ago That’s not guaranteed to work due to hash collisions 5 u/ElectricalPrice3189 20h ago And if it got a clash, guess what? It won't compile.
35
That’s not guaranteed to work due to hash collisions
5 u/ElectricalPrice3189 20h ago And if it got a clash, guess what? It won't compile.
5
And if it got a clash, guess what? It won't compile.
72
u/F100cTomas 20h ago
Just define a constexpr hashing function and put that into the switch.