From 9c4c3a754a2c1454afdde5c4eee978272bd0b392 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 27 Feb 2017 03:59:02 +0000 Subject: [PATCH] Const methods in value_base. --- include/boost/unordered/detail/implementation.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index b80dbed0..43cab65c 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -2500,8 +2500,12 @@ template struct value_base value_type& value() { return *(ValueType*)this; } + value_type const& value() const { return *(ValueType const*)this; } + value_type* value_ptr() { return (ValueType*)this; } + value_type const* value_ptr() const { return (ValueType const*)this; } + private: value_base& operator=(value_base const&); };