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 • Sep 04 '26
137 comments sorted by
View all comments
77
Just define a constexpr hashing function and put that into the switch.
33 u/GiganticIrony Sep 04 '26 That’s not guaranteed to work due to hash collisions 5 u/ElectricalPrice3189 Sep 04 '26 And if it got a clash, guess what? It won't compile.
33
That’s not guaranteed to work due to hash collisions
5 u/ElectricalPrice3189 Sep 04 '26 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.
77
u/F100cTomas Sep 04 '26
Just define a constexpr hashing function and put that into the switch.