public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] PR 68406: Avoid problem with older host compilers
@ 2015-11-18 14:31 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2015-11-18 14:31 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-18 14:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-18 14:31 [committed] PR 68406: Avoid problem with older host compilers Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).