摘要:
tuple Class template std::tuple is a fixed size collection of heterogeneous values. It is a generalization of std::pair. 可以用来在bind中存储函数指针和参数 实现思路 不定参数 阅读全文
摘要:
any class any; (since C++17) The class any describes a type safe container for single values of any type. (1) An object of class any stores an instanc 阅读全文
摘要:
c++ 实现 key value缓存数据结构 概述 最近在阅读Memcached的源代码,今天借鉴部分设计思想简单的实现了一个keyvalue缓存。 哈希表部分使用了unordered_map,用于实现LRU算法的双向链表嵌套在缓存类中实现。 LRU 算法 LRU算法又称为last least us 阅读全文