File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
libraries/multi_index_lru/include/userver/multi_index_lru Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 44#include < boost/intrusive/list.hpp>
55#include < boost/intrusive/list_hook.hpp>
66#include < boost/multi_index/hashed_index.hpp>
7+ #include < boost/multi_index/mem_fun.hpp>
78
89#include < list>
910#include < functional>
@@ -20,15 +21,11 @@ struct ValueWithHook
2021{
2122 Value value;
2223 mutable boost::intrusive::list_member_hook<> list_hook;
23- ValueWithHook *self ;
24+ const ValueWithHook *GetPointerToSelf () const { return this ; } ;
2425
25- explicit ValueWithHook (const Value& val) : value(val) {
26- self = this ;
27- }
26+ explicit ValueWithHook (const Value& val) : value(val) {}
2827
29- explicit ValueWithHook (Value&& val) : value(std::move(val)) {
30- self = this ;
31- }
28+ explicit ValueWithHook (Value&& val) : value(std::move(val)) {}
3229
3330 ValueWithHook () = delete ;
3431 ValueWithHook (const ValueWithHook&) = delete ;
@@ -87,7 +84,7 @@ class LRUCacheContainer {
8784 IndexSpecifierList,
8885 hashed_unique<
8986 tag<internal_ptr_tag>,
90- member <CacheItem, CacheItem*, &CacheItem::self >
87+ const_mem_fun <CacheItem, const CacheItem*, &CacheItem::GetPointerToSelf >
9188 >
9289 >::type;
9390
You can’t perform that action at this time.
0 commit comments