audio_demo/log/noncopyable.h
2025-02-14 08:58:27 +08:00

17 lines
396 B
C++

#ifndef NONCOPYABLE_H_
#define NONCOPYABLE_H_
//禁止拷贝基类
class noncopyable {
protected:
noncopyable() {}
~noncopyable() {}
private:
//禁止拷贝
noncopyable(const noncopyable &that) = delete;
noncopyable(noncopyable &&that) = delete;
noncopyable &operator=(const noncopyable &that) = delete;
noncopyable &operator=(noncopyable &&that) = delete;
};
#endif