Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
secondcoming
1y ago
0 comments
Save
Share
Technically, you're not supposed to add your own specialisations to the `std` namespace
0 comments
3 comments · 1 top-level
top
newest
oldest
pmalynin
1y ago
· 2 in thread
In general this isn’t true (i guess it is in this specific context). For example I believe it’s totally expected to specialize std hash
tyleo
1y ago
I’ve also done this with hash… though given the footguns scattered about, I wouldn’t be surprised if it broke the spec.
Conscat
1y ago
That is a completely intended way to use std::hash, along with a few other functions like std::tuple_size and std::tuple_element.
j
/
k
navigate · click thread line to collapse