[v3] libstdc++/51558

Jonathan Wakely jwakely.gcc@gmail.com
Thu Dec 15 11:50:00 GMT 2011


On 15 December 2011 11:26, Paolo Carlini wrote:
> Hi,
>
> as far as I can see this version of the fix leads to the best error
> messages: the primary std::hash is complete and consistent besides the
> undefined, but declared, operator and the static_assert (which is designed
> to *always* trigger if the primary is actually instantiated). By declaring
> the operator there are no redundant error messages in typical diagnostic
> outputs *after* the static_assert message.
>
> I'm finishing testing the patch and mean to commit it later today.

Sorry for not thinking of it sooner, but it occurs to me now that
"std::hash is not specialized for this type" might be better than
"std::hash must be specialized for this type", because it isn't true
that it *must* be specialized, users have the option of providing
their own alternative hash function instead of specializing std::hash
(as you've done in the testsuite with X_hash)



More information about the Libstdc++ mailing list