diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-29 21:19:34 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-29 21:19:34 +0000 |
commit | d601e3726d2cec94429c6a2ef1f5fc940264e99b (patch) | |
tree | 7bcd4059a7c64ff418094808ebfb685291a09f7c /libstdc++-v3/include/bits | |
parent | d0874f1282e9b23bbc88c1c2edf50b469be34e7e (diff) | |
download | ppe42-gcc-d601e3726d2cec94429c6a2ef1f5fc940264e99b.tar.gz ppe42-gcc-d601e3726d2cec94429c6a2ef1f5fc940264e99b.zip |
* include/bits/hashtable.cc (__access_protected_ctor): Define and use
new type instead of _Hashtable_ebo_helper.
* testsuite/23_containers/unordered_set/
not_default_constructible_hash_neg.cc: Adjust line number.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204182 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r-- | libstdc++-v3/include/bits/hashtable.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index c639c553d34..aae146b41be 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -277,14 +277,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION "Functor used to map hash code to bucket index" " must be default constructible"); + // _Hash_code_base has a protected default constructor, so use this + // derived type to tell if it's usable. + struct __access_protected_ctor : __hash_code_base { }; + // When hash codes are not cached local iterator inherits from // __hash_code_base above to compute node bucket index so it has to be // default constructible. static_assert(__if_hash_not_cached< - is_default_constructible< - // We use _Hashtable_ebo_helper to access the protected - // default constructor. - __detail::_Hashtable_ebo_helper<0, __hash_code_base, true>>>::value, + is_default_constructible<__access_protected_ctor>>::value, "Cache the hash code or make functors involved in hash code" " and bucket index computation default constructible"); |