This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: RE : Problem with _Hashtable_ebo_helper
- From: Jason Merrill <jason at redhat dot com>
- To: frs dot dumont at gmail dot com, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 23 Oct 2013 14:03:09 -0400
- Subject: Re: RE : Problem with _Hashtable_ebo_helper
- Authentication-results: sourceware.org; auth=none
- References: <526590F3 dot 6070505 at redhat dot com> <s68065723591507235000 at gmail dot com>
On 10/23/2013 02:53 AM, frs.dumont@gmail.com wrote:
That is indeed an issue. We have to force the 3rd template parameter to
true in this context because we are using _Hastable_ebo_helper here only
for convenience to access protected default ctor if any. We know that
_Hashtable_code_base is not final so it is safe to force true. I'll
submit a patch when back home.
I assume you mean the following; I'm going to check it in now to avoid
regressions from my front end patch. I'm still interested in feedback
on my proposed change to the default template argument.
commit c24d6bd2f017cd18a2d896b336c8b6a136307085
Author: Jason Merrill <jason@redhat.com>
Date: Wed Oct 23 09:35:54 2013 -0400
* include/bits/hashtable.h (_Hashtable): Force EBO for _Hash_code_base.
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index 43c89b1..c639c55 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -284,7 +284,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
is_default_constructible<
// We use _Hashtable_ebo_helper to access the protected
// default constructor.
- __detail::_Hashtable_ebo_helper<0, __hash_code_base>>>::value,
+ __detail::_Hashtable_ebo_helper<0, __hash_code_base, true>>>::value,
"Cache the hash code or make functors involved in hash code"
" and bucket index computation default constructible");