This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RE : Problem with _Hashtable_ebo_helper


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");
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]