<div dir="ltr">`std::vector&lt;bool&gt;` is a specialized implementation that is done differently from the other vectors &amp; types because of the need to do the underlying bit packing.<br><div>Other types come out in the wash on their own.</div><div><br></div><div>Chris++;</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 24, 2023 at 2:14 PM Marcin Jaczewski via Std-Discussion &lt;<a href="mailto:std-discussion@lists.isocpp.org">std-discussion@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I recently looked at `std::unordered_map`  and noticed a bit of a<br>
bizarre handling of `std::hash` in the standard library.<br>
Why of all types that could be useful, does the standard define only<br>
`std::vector&lt;bool&gt;`?<br>
Where `std::tuple` or other vectors are left unusable.<br>
<br>
What is the reason for standard not defining<br>
`std::hash&lt;std::vector&lt;T&gt;&gt;` if `T` has a hash?<br>
And why is `bool` the only exception there? What was the motivation for this?<br>
<a href="https://eel.is/c++draft/vector.bool#pspc-7" rel="noreferrer" target="_blank">https://eel.is/c++draft/vector.bool#pspc-7</a><br>
-- <br>
Std-Discussion mailing list<br>
<a href="mailto:Std-Discussion@lists.isocpp.org" target="_blank">Std-Discussion@lists.isocpp.org</a><br>
<a href="https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion" rel="noreferrer" target="_blank">https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion</a><br>
</blockquote></div>

