aboutsummaryrefslogtreecommitdiff
path: root/gcc/hash-map.h
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 /gcc/hash-map.h
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
Diffstat (limited to 'gcc/hash-map.h')
-rw-r--r--gcc/hash-map.h4
1 files changed, 2 insertions, 2 deletions
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