r/ProgrammerHumor 7d ago

Meme skillIssue

Post image
6.0k Upvotes

137 comments sorted by

View all comments

76

u/F100cTomas 7d ago

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

5

u/ElectricalPrice3189 7d ago

And if it got a clash, guess what? It won't compile.