Commit b09bcf83 by François Dumont

hashtable_policy.h (_Hashtable_alloc): New.

2013-08-08  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (_Hashtable_alloc): New.
	(_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than
	_Hashtable.
	(_Before_begin<>): Remove.
	* include/bits/hashtable.h (_Hashtable): Inherit from
	_Hashtable_alloc and adapt. Restore _M_before_begin field.
	* src/c++11/hashtable_c++0x.cc: Add ext/alloc_traits.h include.
	* python/libstdcxx/v6/printers.py (StdHashtableIterator): Adapt
	access to hashtable before begin.
	* testsuite/23_containers/unordered_set/
	not_default_constructible_hash_neg.cc: Adapt dg-error line number.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc:
	Likewise.

From-SVN: r201592
parent f276d31d
2013-08-08 François Dumont <fdumont@gcc.gnu.org>
* include/bits/hashtable_policy.h (_Hashtable_alloc): New.
(_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than
_Hashtable.
(_Before_begin<>): Remove.
* include/bits/hashtable.h (_Hashtable): Inherit from
_Hashtable_alloc and adapt. Restore _M_before_begin field.
* src/c++11/hashtable_c++0x.cc: Add ext/alloc_traits.h include.
* python/libstdcxx/v6/printers.py (StdHashtableIterator): Adapt
access to hashtable before begin.
* testsuite/23_containers/unordered_set/
not_default_constructible_hash_neg.cc: Adapt dg-error line number.
* testsuite/23_containers/unordered_set/instantiation_neg.cc:
Likewise.
2013-08-07 Tim Shen <timshen91@gmail.com>
* include/Makefile.am: Adjust to new files.
......
......@@ -652,7 +652,7 @@ class Tr1HashtableIterator:
class StdHashtableIterator:
def __init__(self, hash):
self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
self.node = hash['_M_before_begin']['_M_nxt']
self.node_type = find_type(hash.type, '__node_type').pointer()
def __iter__(self):
......
......@@ -29,6 +29,7 @@
#include <initializer_list>
#include <tuple>
#include <ext/aligned_buffer.h>
#include <ext/alloc_traits.h>
#include <bits/hashtable_policy.h>
namespace std _GLIBCXX_VISIBILITY(default)
......
......@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-error "with noexcept" "" { target *-*-* } 258 }
// { dg-error "with noexcept" "" { target *-*-* } 265 }
#include <unordered_set>
......
......@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-error "default constructible" "" { target *-*-* } 276 }
// { dg-error "default constructible" "" { target *-*-* } 283 }
#include <unordered_set>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment