aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-07-10 13:02:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-07-10 13:02:34 +0000
commit86e01104131611a89c0b2f58fa1be720f29e550d (patch)
treef8f8659d1de452ccf0832c8e55bc1b6149fa6796
parentf1bc6caec5fdc1affd2047d518137f7de32cd5d6 (diff)
downloadgcc-86e01104131611a89c0b2f58fa1be720f29e550d.zip
gcc-86e01104131611a89c0b2f58fa1be720f29e550d.tar.gz
gcc-86e01104131611a89c0b2f58fa1be720f29e550d.tar.bz2
hash-map.h (hash_map::iterator::operator*): Return references to key and value.
2018-07-10 Richard Biener <rguenther@suse.de> * hash-map.h (hash_map::iterator::operator*): Return references to key and value. From-SVN: r262539
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/hash-map.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3230cf3..f871780 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-10 Richard Biener <rguenther@suse.de>
+
+ * hash-map.h (hash_map::iterator::operator*): Return
+ references to key and value.
+
2018-07-10 Jakub Jelinek <jakub@redhat.com>
PR c++/86443
diff --git a/gcc/hash-map.h b/gcc/hash-map.h
index 7861440..3984828 100644
--- a/gcc/hash-map.h
+++ b/gcc/hash-map.h
@@ -223,10 +223,10 @@ public:
return *this;
}
- std::pair<Key, Value> operator* ()
+ std::pair<const Key&, Value&> operator* ()
{
hash_entry &e = *m_iter;
- return std::pair<Key, Value> (e.m_key, e.m_value);
+ return std::pair<const Key&, Value&> (e.m_key, e.m_value);
}
bool