From 86e01104131611a89c0b2f58fa1be720f29e550d Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 10 Jul 2018 13:02:34 +0000 Subject: [PATCH] hash-map.h (hash_map::iterator::operator*): Return references to key and value. 2018-07-10 Richard Biener * hash-map.h (hash_map::iterator::operator*): Return references to key and value. From-SVN: r262539 --- gcc/ChangeLog | 5 +++++ gcc/hash-map.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3230cf3aa82..f8717804b2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-07-10 Richard Biener + + * hash-map.h (hash_map::iterator::operator*): Return + references to key and value. + 2018-07-10 Jakub Jelinek PR c++/86443 diff --git a/gcc/hash-map.h b/gcc/hash-map.h index 7861440f3b3..39848289d80 100644 --- a/gcc/hash-map.h +++ b/gcc/hash-map.h @@ -223,10 +223,10 @@ public: return *this; } - std::pair operator* () + std::pair operator* () { hash_entry &e = *m_iter; - return std::pair (e.m_key, e.m_value); + return std::pair (e.m_key, e.m_value); } bool -- 2.30.2