From e89cb1b9f70f1625b8c84d0e0b23cca476a4ee96 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 17 Jun 2018 10:31:27 -0400 Subject: [PATCH] Internals: For unordered set, add constant accessor. No functional change. --- include/verilated_unordered_set_map.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/verilated_unordered_set_map.h b/include/verilated_unordered_set_map.h index ec71a099d..73e6ecad4 100644 --- a/include/verilated_unordered_set_map.h +++ b/include/verilated_unordered_set_map.h @@ -511,6 +511,11 @@ template second; } + const Value& at(const Key& k) const { + iterator it = find(k); + if (it == end()) { throw std::out_of_range("sorry"); } + return it->second; + } void clear() { m_set.clear(); } size_type size() const { return m_set.size(); } };