This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] libstdc++/51558
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 15 Dec 2011 11:49:48 +0000
- Subject: Re: [v3] libstdc++/51558
- References: <4EE9D955.7070207@oracle.com>
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)