As the title says, std::begin, std::end, std::swap, etc, are very well known std "customization points" (functions meant to be found by ADL). However, std::hash is, I think, the only std behaviour customizable by the user that implies to (A) open std namespace (B) create a partial specialization.
Why hasn't std::hash being designed as a customization point like the other ones, by overloading a function instead of partial specializing a class?
Like
std::less,std::hashis meant to be a function object. For example,std::unordered_settakes aHashtemplate argument:That's why
std::hashis a class template instead of a function template. You can specializestd::hashand makeunordered_setdefault to using it, or you can provide your own hash function object.