diff mbox

[committed] PR 68406: Avoid problem with older host compilers

Message ID 87d1v7js5b.fsf@e105548-lin.cambridge.arm.com
State New
Headers show

Commit Message

Richard Sandiford Nov. 18, 2015, 2:31 p.m. UTC
Older compilers require the Key typedef to be expanded for the traversal
function templates.  This patch uses the same approach as we did for
hash_map.

Tested on x86_64-linux-gnu and applied as obvious (given the previous
hash_map patch).

Sorry for the breakage.

Richard


gcc/
	PR bootstrap/68406
	* hash-set.h (hash_set::traverse): Expand Key typedef.
diff mbox

Patch

diff --git a/gcc/hash-set.h b/gcc/hash-set.h
index 679d2b6..8a7c9a0 100644
--- a/gcc/hash-set.h
+++ b/gcc/hash-set.h
@@ -68,7 +68,7 @@  public:
   /* Call the call back on each pair of key and value with the passed in
      arg.  */
 
-  template<typename Arg, bool (*f)(const Key &, Arg)>
+  template<typename Arg, bool (*f)(const typename Traits::value_type &, Arg)>
   void traverse (Arg a) const
     {
       for (typename hash_table<Traits>::iterator iter = m_table.begin ();