mirror of git://gcc.gnu.org/git/gcc.git
hashtable_policy.h (_Hash_code_base): Restore default constructor protected.
2013-02-13 François Dumont <fdumont@gcc.gnu.org> * include/bits/hashtable_policy.h (_Hash_code_base): Restore default constructor protected. * include/bits/hashtable.h: static assert that _Hash_code_base has a default constructor available through inheritance. From-SVN: r196030
This commit is contained in:
parent
c4bfe8bfdb
commit
d9a3647a22
|
|
@ -1,3 +1,10 @@
|
||||||
|
2013-02-13 François Dumont <fdumont@gcc.gnu.org>
|
||||||
|
|
||||||
|
* include/bits/hashtable_policy.h (_Hash_code_base): Restore
|
||||||
|
default constructor protected.
|
||||||
|
* include/bits/hashtable.h: static assert that _Hash_code_base has
|
||||||
|
a default constructor available through inheritance.
|
||||||
|
|
||||||
2013-02-12 Paolo Carlini <paolo.carlini@oracle.com>
|
2013-02-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* include/c_std/cstdlib (at_quick_exit, quick_exit): Provide in
|
* include/c_std/cstdlib (at_quick_exit, quick_exit): Provide in
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
// __hash_code_base above to compute node bucket index so it has to be
|
// __hash_code_base above to compute node bucket index so it has to be
|
||||||
// default constructible.
|
// default constructible.
|
||||||
static_assert(__if_hash_not_cached<
|
static_assert(__if_hash_not_cached<
|
||||||
is_default_constructible<__hash_code_base>>::value,
|
is_default_constructible<
|
||||||
|
// We use _Hashtable_ebo_helper to access the protected
|
||||||
|
// default constructor.
|
||||||
|
__detail::_Hashtable_ebo_helper<0, __hash_code_base>>>::value,
|
||||||
"Cache the hash code or make functors involved in hash code"
|
"Cache the hash code or make functors involved in hash code"
|
||||||
" and bucket index computation default constructible");
|
" and bucket index computation default constructible");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -918,15 +918,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>;
|
using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>;
|
||||||
using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>;
|
using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>;
|
||||||
|
|
||||||
public:
|
|
||||||
// We need the default constructor for the local iterators.
|
|
||||||
_Hash_code_base() = default;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef void* __hash_code;
|
typedef void* __hash_code;
|
||||||
typedef _Hash_node<_Value, false> __node_type;
|
typedef _Hash_node<_Value, false> __node_type;
|
||||||
|
|
||||||
protected:
|
// We need the default constructor for the local iterators.
|
||||||
|
_Hash_code_base() = default;
|
||||||
|
|
||||||
_Hash_code_base(const _ExtractKey& __ex, const _H1&, const _H2&,
|
_Hash_code_base(const _ExtractKey& __ex, const _H1&, const _H2&,
|
||||||
const _Hash& __h)
|
const _Hash& __h)
|
||||||
: __ebo_extract_key(__ex), __ebo_hash(__h) { }
|
: __ebo_extract_key(__ex), __ebo_hash(__h) { }
|
||||||
|
|
@ -1004,13 +1002,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
hash_function() const
|
hash_function() const
|
||||||
{ return _M_h1(); }
|
{ return _M_h1(); }
|
||||||
|
|
||||||
// We need the default constructor for the local iterators.
|
|
||||||
_Hash_code_base() = default;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef std::size_t __hash_code;
|
typedef std::size_t __hash_code;
|
||||||
typedef _Hash_node<_Value, false> __node_type;
|
typedef _Hash_node<_Value, false> __node_type;
|
||||||
|
|
||||||
|
// We need the default constructor for the local iterators.
|
||||||
|
_Hash_code_base() = default;
|
||||||
|
|
||||||
_Hash_code_base(const _ExtractKey& __ex,
|
_Hash_code_base(const _ExtractKey& __ex,
|
||||||
const _H1& __h1, const _H2& __h2,
|
const _H1& __h1, const _H2& __h2,
|
||||||
const _Default_ranged_hash&)
|
const _Default_ranged_hash&)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue