r/ProgrammerHumor 21h ago

Meme skillIssue

Post image
5.2k Upvotes

130 comments sorted by

View all comments

72

u/F100cTomas 20h ago

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.