Namespaces
Variants
Views
Actions

Talk:cpp/utility/hash

From cppreference.com

[edit] Why no need for separate pages for the sepcializations?

There are separate pages (or, mostly, placeholder dcl list entries) for the specializations of std::swap for various types. If all specializations of std::hash should be listed here, then all specializations of swap should be listed in std::swap? --Cubbi 13:17, 4 October 2011 (PDT)

btw, I missed std::shared_ptr, but other than that, what's present on this page and in the commented-out section is the complete list of standard specializations of std::hash. There isn't really a lot of substance to each specialization (what could the examples be, std::unordered_set of std::thread::id's, std::unordered_set of std::error_code's, etc?). Perhaps a sensible consistent approach for such function template specializations would be to list each standard specialization as a tdcl list item twice: once in the class page and once in the function template page? The way hash<string> is done now?
On the other hand, there are *special* specializations, such as std::vector<bool> and std::ctype<char> and std::uses_alocator<tuple>, whose semantics, not just implementation, are significantly different from the general template - those, I think, deserve their own pages. --Cubbi 13:54, 4 October 2011 (PDT)
... although perhaps they don't deserve frontpage mention as I placed ctype<char>, I think I'll move the link to it inside cpp/locale/ctype --Cubbi 13:56, 4 October 2011 (PDT)
I've noticed this talk only now. I agree with everything - this is the only possible way to consistently represent various specializations/overloads. I've proved that using the trial and error approach. LOL. P12 14:35, 4 October 2011 (PDT)
BTW I think we need a separate page for std::vector<bool>, since its interface is different from the std::vector. Mixing these two pages would result in a lot of confusion. Still, there's not much work to be done as we could use already existing templates.P12 14:40, 4 October 2011 (PDT)