Re:Show HN: A header only C++11 LRU Cache template class, wi...
by en4bz on Tuesday August 30, 2016 @11:53AM
(#12391221)
Use splice to move items to the front of the list without copying in the find method.
Re:Show HN: A header only C++11 LRU Cache template class, wi...
by mohaps on Tuesday August 30, 2016 @11:35AM
(#12391069)
ah, now I remember why I had carried on with the linked list from the old c++ codebase
https://gist.github.com/Quinny/09e34afb1d187e43dea2f3c3b0c04...
the key refresh in std::list required a copy of the std::pair, where as I wished to keep it as an unlink / relink
https://gist.github.com/Quinny/09e34afb1d187e43dea2f3c3b0c04...