fix(splay_map): add 'const' to coersion operator of ref class

[skip ci]
This commit is contained in:
Soonho Kong 2013-09-26 19:09:37 -07:00
parent 54e63fd4de
commit 60157aa92a

View file

@ -41,7 +41,7 @@ public:
public:
ref(splay_map & m, K const & k):m_map(m), m_key(k) {}
ref & operator=(T const & v) { m_map.insert(m_key, v); return *this; }
operator T const &() {
operator T const &() const {
entry const * e = m_map.find(m_key);
if (e) {
return e->second;