This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Problem with _Hashtable_ebo_helper
- From: Jason Merrill <jason at redhat dot com>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>, François Dumont <frs dot dumont at gmail dot com>
- Date: Mon, 21 Oct 2013 16:39:15 -0400
- Subject: Problem with _Hashtable_ebo_helper
- Authentication-results: sourceware.org; auth=none
I've been working on fixing G++ handling of trivial but not callable
[cd]tors, and I've run into a problem in the library.
The final_hash.cc tests are failing with the obscure error
error: static assertion failed: Cache the hash code or make functors involved in hash code and bucket index computation default constructible
A comment in hashtable.h says,
// We use _Hashtable_ebo_helper to access the protected
// default constructor.
But this doesn't work if the class with a protected default constructor
(in this case, _Hash_code_base) is non-empty; in that case,
_Hashtable_ebo_helper doesn't derive from _Tp but rather uses it as a
non-static data member, in which case it has no access to the protected
constructor. Previously the compiler didn't catch this because the
constructor was trivial, but with my WIP it does.
Any thoughts about how to address this?
Jason