
Thorsten Ottosen wrote:
"Daniel James" <daniel@calamity.org.uk> wrote in message news:d1napl$8pu$1@sea.gmane.org... Peter Dimov wrote:
I don't remember this being discussed during the review, could you please explain it in more detail? Do you mean that hash_value should have a primary template that assumes that its argument is a range?
yes.
If so, I strongly oppose it. Ranges aren't special from the point of view of hash_value, they shouldn't monopolize the primary template.
why should anything *special* monopolize the primary template? Why not something *general*?
There can be at most one primary template (and for ADL customization points, there should be none). When you pick your favorite type category and put that in a primary template, this makes this type category special with respect to the primitive. It means that the primitive operates on this specific category of types. hash_value is not a range primitive. It is a value primitive.