若想禁止类对象的拷贝/赋值等操作,可通过将拷贝及赋值操作相关接口定义为私有,具体可参考单例模式及leveldb::cache
private:
void LRU_Remove(Handle* e);
void LRU_Append(Handle* e);
void Unref(Handle* e);
struct Rep;
Rep* rep_;
// No copying allowed
Cache(const Cache&);
void operator=(const Cache&);