Use empty name for unused move constructor/assignment parameter.

This commit is contained in:
levlam 2023-05-05 13:51:19 +03:00
parent c2795ca904
commit c0911577f7
57 changed files with 212 additions and 212 deletions

View File

@ -653,8 +653,8 @@ Client::Response Client::execute(Request &&request) {
return response;
}
Client::Client(Client &&other) noexcept = default;
Client &Client::operator=(Client &&other) noexcept = default;
Client::Client(Client &&) noexcept = default;
Client &Client::operator=(Client &&) noexcept = default;
Client::~Client() = default;
ClientManager::ClientManager() : impl_(std::make_unique<Impl>()) {
@ -706,8 +706,8 @@ void ClientManager::set_log_message_callback(int max_verbosity_level, LogMessage
}
}
ClientManager::ClientManager(ClientManager &&other) noexcept = default;
ClientManager &ClientManager::operator=(ClientManager &&other) noexcept = default;
ClientManager::ClientManager(ClientManager &&) noexcept = default;
ClientManager &ClientManager::operator=(ClientManager &&) noexcept = default;
ClientManager::~ClientManager() = default;
ClientManager *ClientManager::get_manager_singleton() {

View File

@ -28,9 +28,9 @@ void ClientActor::request(uint64 id, td_api::object_ptr<td_api::Function> reques
ClientActor::~ClientActor() = default;
ClientActor::ClientActor(ClientActor &&other) noexcept = default;
ClientActor::ClientActor(ClientActor &&) noexcept = default;
ClientActor &ClientActor::operator=(ClientActor &&other) noexcept = default;
ClientActor &ClientActor::operator=(ClientActor &&) noexcept = default;
td_api::object_ptr<td_api::Object> ClientActor::execute(td_api::object_ptr<td_api::Function> request) {
return Td::static_request(std::move(request));

View File

@ -76,9 +76,9 @@ class ClientActor final : public Actor {
*/
ClientActor &operator=(ClientActor &&other) noexcept;
ClientActor(const ClientActor &other) = delete;
ClientActor(const ClientActor &) = delete;
ClientActor &operator=(const ClientActor &other) = delete;
ClientActor &operator=(const ClientActor &) = delete;
private:
void start_up() final;

View File

@ -73,8 +73,8 @@ class Global final : public ActorContext {
~Global() final;
Global(const Global &) = delete;
Global &operator=(const Global &) = delete;
Global(Global &&other) = delete;
Global &operator=(Global &&other) = delete;
Global(Global &&) = delete;
Global &operator=(Global &&) = delete;
static constexpr int32 ID = -572104940;
int32 get_id() const final {

View File

@ -1456,8 +1456,8 @@ class MessagesManager final : public Actor {
Dialog() = default;
Dialog(const Dialog &) = delete;
Dialog &operator=(const Dialog &) = delete;
Dialog(Dialog &&other) = delete;
Dialog &operator=(Dialog &&other) = delete;
Dialog(Dialog &&) = delete;
Dialog &operator=(Dialog &&) = delete;
~Dialog() = default;
template <class StorerT>

View File

@ -72,8 +72,8 @@ class OrderedMessages {
public:
IteratorBase(const IteratorBase &) = delete;
IteratorBase &operator=(const IteratorBase &) = delete;
IteratorBase(IteratorBase &&other) = default;
IteratorBase &operator=(IteratorBase &&other) = default;
IteratorBase(IteratorBase &&) = default;
IteratorBase &operator=(IteratorBase &&) = default;
void operator++() {
if (stack_.empty()) {

View File

@ -294,10 +294,10 @@ unique_ptr<SecretChatActor::Context> SecretChatsManager::make_secret_chat_contex
: secret_chat_id_(SecretChatId(id)), parent_(std::move(parent)), secret_chat_db_(std::move(secret_chat_db)) {
sequence_dispatcher_ = create_actor<SequenceDispatcher>("SecretChat SequenceDispatcher");
}
Context(const Context &other) = delete;
Context &operator=(const Context &other) = delete;
Context(Context &&other) = delete;
Context &operator=(Context &&other) = delete;
Context(const Context &) = delete;
Context &operator=(const Context &) = delete;
Context(Context &&) = delete;
Context &operator=(Context &&) = delete;
~Context() final {
send_closure(std::move(sequence_dispatcher_), &SequenceDispatcher::close_silent);
}

View File

@ -389,8 +389,8 @@ class FileExternalGenerateActor final : public FileGenerateActor {
};
FileGenerateManager::Query::~Query() = default;
FileGenerateManager::Query::Query(Query &&other) noexcept = default;
FileGenerateManager::Query &FileGenerateManager::Query::operator=(Query &&other) noexcept = default;
FileGenerateManager::Query::Query(Query &&) noexcept = default;
FileGenerateManager::Query &FileGenerateManager::Query::operator=(Query &&) noexcept = default;
static Status check_mtime(std::string &conversion, CSlice original_path) {
if (original_path.empty()) {

View File

@ -49,8 +49,8 @@ class FileGenerateManager final : public Actor {
private:
struct Query {
Query() = default;
Query(const Query &other) = delete;
Query &operator=(const Query &other) = delete;
Query(const Query &) = delete;
Query &operator=(const Query &) = delete;
Query(Query &&other) noexcept;
Query &operator=(Query &&other) noexcept;
~Query();

View File

@ -411,10 +411,10 @@ class FileManager final : public FileLoadManager::Callback {
};
explicit FileManager(unique_ptr<Context> context);
FileManager(const FileManager &other) = delete;
FileManager &operator=(const FileManager &other) = delete;
FileManager(FileManager &&other) = delete;
FileManager &operator=(FileManager &&other) = delete;
FileManager(const FileManager &) = delete;
FileManager &operator=(const FileManager &) = delete;
FileManager(FileManager &&) = delete;
FileManager &operator=(FileManager &&) = delete;
~FileManager() final;
static bool is_remotely_generated_file(Slice conversion);

View File

@ -132,9 +132,9 @@ void ConnectionCreator::ClientInfo::add_session_id(int64 session_id) {
ConnectionCreator::ConnectionCreator(ActorShared<> parent) : parent_(std::move(parent)) {
}
ConnectionCreator::ConnectionCreator(ConnectionCreator &&other) = default;
ConnectionCreator::ConnectionCreator(ConnectionCreator &&) = default;
ConnectionCreator &ConnectionCreator::operator=(ConnectionCreator &&other) = default;
ConnectionCreator &ConnectionCreator::operator=(ConnectionCreator &&) = default;
ConnectionCreator::~ConnectionCreator() = default;

View File

@ -311,8 +311,8 @@ class NetQuery final : public TsListNode<NetQueryDebug> {
this->store(other.load(std::memory_order_relaxed), std::memory_order_relaxed);
return *this;
}
movable_atomic(const movable_atomic &other) = delete;
movable_atomic &operator=(const movable_atomic &other) = delete;
movable_atomic(const movable_atomic &) = delete;
movable_atomic &operator=(const movable_atomic &) = delete;
~movable_atomic() = default;
};

View File

@ -22,8 +22,8 @@ class SessionMultiProxy final : public Actor {
SessionMultiProxy(int32 session_count, std::shared_ptr<AuthDataShared> shared_auth_data, bool is_primary,
bool is_main, bool use_pfs, bool allow_media_only, bool is_media, bool is_cdn,
bool need_destroy_auth_key);
SessionMultiProxy(const SessionMultiProxy &other) = delete;
SessionMultiProxy &operator=(const SessionMultiProxy &other) = delete;
SessionMultiProxy(const SessionMultiProxy &) = delete;
SessionMultiProxy &operator=(const SessionMultiProxy &) = delete;
~SessionMultiProxy() final;
void send(NetQueryPtr query);

View File

@ -28,10 +28,10 @@ class TempAuthKeyWatchdog final : public NetQueryCallback {
explicit RegisteredAuthKeyImpl(int64 auth_key_id)
: watchdog_(G()->temp_auth_key_watchdog()), auth_key_id_(auth_key_id) {
}
RegisteredAuthKeyImpl(const RegisteredAuthKeyImpl &other) = delete;
RegisteredAuthKeyImpl &operator=(const RegisteredAuthKeyImpl &other) = delete;
RegisteredAuthKeyImpl(RegisteredAuthKeyImpl &&other) = delete;
RegisteredAuthKeyImpl &operator=(RegisteredAuthKeyImpl &&other) = delete;
RegisteredAuthKeyImpl(const RegisteredAuthKeyImpl &) = delete;
RegisteredAuthKeyImpl &operator=(const RegisteredAuthKeyImpl &) = delete;
RegisteredAuthKeyImpl(RegisteredAuthKeyImpl &&) = delete;
RegisteredAuthKeyImpl &operator=(RegisteredAuthKeyImpl &&) = delete;
~RegisteredAuthKeyImpl() {
send_closure(watchdog_, &TempAuthKeyWatchdog::unregister_auth_key_id_impl, auth_key_id_);
}

View File

@ -97,8 +97,8 @@ class unique_ptr {
using element_type = T;
unique_ptr() noexcept = default;
unique_ptr(const unique_ptr &other) = delete;
unique_ptr &operator=(const unique_ptr &other) = delete;
unique_ptr(const unique_ptr &) = delete;
unique_ptr &operator=(const unique_ptr &) = delete;
unique_ptr(unique_ptr &&other) noexcept : ptr_(other.release()) {
}
unique_ptr &operator=(unique_ptr &&other) noexcept {

View File

@ -55,12 +55,12 @@ class JvmThreadDetacher {
explicit JvmThreadDetacher(JavaVM *java_vm) : java_vm_(java_vm) {
}
JvmThreadDetacher(const JvmThreadDetacher &other) = delete;
JvmThreadDetacher &operator=(const JvmThreadDetacher &other) = delete;
JvmThreadDetacher(const JvmThreadDetacher &) = delete;
JvmThreadDetacher &operator=(const JvmThreadDetacher &) = delete;
JvmThreadDetacher(JvmThreadDetacher &&other) : java_vm_(other.java_vm_) {
other.java_vm_ = nullptr;
}
JvmThreadDetacher &operator=(JvmThreadDetacher &&other) = delete;
JvmThreadDetacher &operator=(JvmThreadDetacher &&) = delete;
~JvmThreadDetacher() {
detach();
}

View File

@ -107,10 +107,10 @@ class MultiPromiseActorSafe final : public MultiPromiseInterface {
size_t promise_count() const final;
explicit MultiPromiseActorSafe(string name) : multi_promise_(td::make_unique<MultiPromiseActor>(std::move(name))) {
}
MultiPromiseActorSafe(const MultiPromiseActorSafe &other) = delete;
MultiPromiseActorSafe &operator=(const MultiPromiseActorSafe &other) = delete;
MultiPromiseActorSafe(MultiPromiseActorSafe &&other) = delete;
MultiPromiseActorSafe &operator=(MultiPromiseActorSafe &&other) = delete;
MultiPromiseActorSafe(const MultiPromiseActorSafe &) = delete;
MultiPromiseActorSafe &operator=(const MultiPromiseActorSafe &) = delete;
MultiPromiseActorSafe(MultiPromiseActorSafe &&) = delete;
MultiPromiseActorSafe &operator=(MultiPromiseActorSafe &&) = delete;
~MultiPromiseActorSafe() final;
private:

View File

@ -30,10 +30,10 @@ class EventPromise final : public PromiseInterface<Unit> {
do_set_error();
}
EventPromise(const EventPromise &other) = delete;
EventPromise &operator=(const EventPromise &other) = delete;
EventPromise(EventPromise &&other) = delete;
EventPromise &operator=(EventPromise &&other) = delete;
EventPromise(const EventPromise &) = delete;
EventPromise &operator=(const EventPromise &) = delete;
EventPromise(EventPromise &&) = delete;
EventPromise &operator=(EventPromise &&) = delete;
~EventPromise() final {
do_set_error();
}
@ -95,8 +95,8 @@ class PromiseActor final : public PromiseInterface<T> {
public:
PromiseActor() = default;
PromiseActor(const PromiseActor &other) = delete;
PromiseActor &operator=(const PromiseActor &other) = delete;
PromiseActor(const PromiseActor &) = delete;
PromiseActor &operator=(const PromiseActor &) = delete;
PromiseActor(PromiseActor &&) = default;
PromiseActor &operator=(PromiseActor &&) = default;
~PromiseActor() final {
@ -156,11 +156,11 @@ class FutureActor final : public Actor {
FutureActor() = default;
FutureActor(const FutureActor &other) = delete;
FutureActor &operator=(const FutureActor &other) = delete;
FutureActor(const FutureActor &) = delete;
FutureActor &operator=(const FutureActor &) = delete;
FutureActor(FutureActor &&other) = default;
FutureActor &operator=(FutureActor &&other) = default;
FutureActor(FutureActor &&) = default;
FutureActor &operator=(FutureActor &&) = default;
~FutureActor() final = default;

View File

@ -26,8 +26,8 @@ class Signal {
class Slot final : public Actor {
public:
Slot() = default;
Slot(const Slot &other) = delete;
Slot &operator=(const Slot &other) = delete;
Slot(const Slot &) = delete;
Slot &operator=(const Slot &) = delete;
Slot(Slot &&) = default;
Slot &operator=(Slot &&) = default;
~Slot() final {

View File

@ -23,8 +23,8 @@ class ActorId {
explicit ActorId(ObjectPool<ActorInfo>::WeakPtr ptr) : ptr_(ptr) {
}
ActorId() = default;
ActorId(const ActorId &other) = default;
ActorId &operator=(const ActorId &other) = default;
ActorId(const ActorId &) = default;
ActorId &operator=(const ActorId &) = default;
ActorId(ActorId &&other) noexcept : ptr_(other.ptr_) {
other.clear();
}
@ -79,8 +79,8 @@ class ActorOwn {
ActorOwn &operator=(ActorOwn<OtherActorType> &&other);
ActorOwn(ActorOwn &&other) noexcept;
ActorOwn &operator=(ActorOwn &&other) noexcept;
ActorOwn(const ActorOwn &other) = delete;
ActorOwn &operator=(const ActorOwn &other) = delete;
ActorOwn(const ActorOwn &) = delete;
ActorOwn &operator=(const ActorOwn &) = delete;
~ActorOwn();
bool empty() const;
@ -111,8 +111,8 @@ class ActorShared {
ActorShared &operator=(ActorShared<OtherActorType> &&other);
ActorShared(ActorShared &&other) noexcept;
ActorShared &operator=(ActorShared &&other) noexcept;
ActorShared(const ActorShared &other) = delete;
ActorShared &operator=(const ActorShared &other) = delete;
ActorShared(const ActorShared &) = delete;
ActorShared &operator=(const ActorShared &) = delete;
~ActorShared();
uint64 token() const;

View File

@ -155,7 +155,7 @@ class Event {
Event() : Event(Type::NoType) {
}
Event(const Event &other) = delete;
Event(const Event &) = delete;
Event &operator=(const Event &) = delete;
Event(Event &&other) noexcept : type(other.type), link_token(other.link_token), data(other.data) {
other.type = Type::NoType;

View File

@ -46,10 +46,10 @@ class SchedulerGuard {
public:
explicit SchedulerGuard(Scheduler *scheduler, bool lock = true);
~SchedulerGuard();
SchedulerGuard(const SchedulerGuard &other) = delete;
SchedulerGuard &operator=(const SchedulerGuard &other) = delete;
SchedulerGuard(SchedulerGuard &&other) = default;
SchedulerGuard &operator=(SchedulerGuard &&other) = delete;
SchedulerGuard(const SchedulerGuard &) = delete;
SchedulerGuard &operator=(const SchedulerGuard &) = delete;
SchedulerGuard(SchedulerGuard &&) = default;
SchedulerGuard &operator=(SchedulerGuard &&) = delete;
private:
MovableValue<bool> is_valid_ = true;

View File

@ -34,10 +34,10 @@ class EventGuard {
return event_context_.flags == 0;
}
EventGuard(const EventGuard &other) = delete;
EventGuard &operator=(const EventGuard &other) = delete;
EventGuard(EventGuard &&other) = delete;
EventGuard &operator=(EventGuard &&other) = delete;
EventGuard(const EventGuard &) = delete;
EventGuard &operator=(const EventGuard &) = delete;
EventGuard(EventGuard &&) = delete;
EventGuard &operator=(EventGuard &&) = delete;
~EventGuard();
private:

View File

@ -26,10 +26,10 @@ extern int VERBOSITY_NAME(sqlite);
class SqliteStatement {
public:
SqliteStatement() = default;
SqliteStatement(const SqliteStatement &other) = delete;
SqliteStatement &operator=(const SqliteStatement &other) = delete;
SqliteStatement(SqliteStatement &&other) = default;
SqliteStatement &operator=(SqliteStatement &&other) = default;
SqliteStatement(const SqliteStatement &) = delete;
SqliteStatement &operator=(const SqliteStatement &) = delete;
SqliteStatement(SqliteStatement &&) = default;
SqliteStatement &operator=(SqliteStatement &&) = default;
~SqliteStatement();
Status bind_blob(int id, Slice blob) TD_WARN_UNUSED_RESULT;

View File

@ -47,10 +47,10 @@ class Binlog {
public:
enum class Error : int { WrongPassword = -1037284 };
Binlog();
Binlog(const Binlog &other) = delete;
Binlog &operator=(const Binlog &other) = delete;
Binlog(Binlog &&other) = delete;
Binlog &operator=(Binlog &&other) = delete;
Binlog(const Binlog &) = delete;
Binlog &operator=(const Binlog &) = delete;
Binlog(Binlog &&) = delete;
Binlog &operator=(Binlog &&) = delete;
~Binlog();
using Callback = std::function<void(const BinlogEvent &)>;

View File

@ -35,10 +35,10 @@ class ConcurrentBinlog final : public BinlogInterface {
ConcurrentBinlog();
explicit ConcurrentBinlog(unique_ptr<Binlog> binlog, int scheduler_id = -1);
ConcurrentBinlog(const ConcurrentBinlog &other) = delete;
ConcurrentBinlog &operator=(const ConcurrentBinlog &other) = delete;
ConcurrentBinlog(ConcurrentBinlog &&other) = delete;
ConcurrentBinlog &operator=(ConcurrentBinlog &&other) = delete;
ConcurrentBinlog(const ConcurrentBinlog &) = delete;
ConcurrentBinlog &operator=(const ConcurrentBinlog &) = delete;
ConcurrentBinlog(ConcurrentBinlog &&) = delete;
ConcurrentBinlog &operator=(ConcurrentBinlog &&) = delete;
~ConcurrentBinlog() final;
void force_sync(Promise<> promise) final;

View File

@ -30,10 +30,10 @@ class HttpReader {
Result<size_t> read_next(HttpQuery *query, bool can_be_slow = true) TD_WARN_UNUSED_RESULT; // TODO move query to init
HttpReader() = default;
HttpReader(const HttpReader &other) = delete;
HttpReader &operator=(const HttpReader &other) = delete;
HttpReader(HttpReader &&other) = delete;
HttpReader &operator=(HttpReader &&other) = delete;
HttpReader(const HttpReader &) = delete;
HttpReader &operator=(const HttpReader &) = delete;
HttpReader(HttpReader &&) = delete;
HttpReader &operator=(HttpReader &&) = delete;
~HttpReader() {
if (!temp_file_.empty()) {
clean_temporary_file();

View File

@ -28,10 +28,10 @@ class BigNumContext::Impl {
Impl() : big_num_context(BN_CTX_new()) {
LOG_IF(FATAL, big_num_context == nullptr);
}
Impl(const Impl &other) = delete;
Impl &operator=(const Impl &other) = delete;
Impl(Impl &&other) = delete;
Impl &operator=(Impl &&other) = delete;
Impl(const Impl &) = delete;
Impl &operator=(const Impl &) = delete;
Impl(Impl &&) = delete;
Impl &operator=(Impl &&) = delete;
~Impl() {
BN_CTX_free(big_num_context);
}
@ -40,8 +40,8 @@ class BigNumContext::Impl {
BigNumContext::BigNumContext() : impl_(make_unique<Impl>()) {
}
BigNumContext::BigNumContext(BigNumContext &&other) noexcept = default;
BigNumContext &BigNumContext::operator=(BigNumContext &&other) noexcept = default;
BigNumContext::BigNumContext(BigNumContext &&) noexcept = default;
BigNumContext &BigNumContext::operator=(BigNumContext &&) noexcept = default;
BigNumContext::~BigNumContext() = default;
class BigNum::Impl {
@ -53,10 +53,10 @@ class BigNum::Impl {
explicit Impl(BIGNUM *big_num) : big_num(big_num) {
LOG_IF(FATAL, big_num == nullptr);
}
Impl(const Impl &other) = delete;
Impl &operator=(const Impl &other) = delete;
Impl(Impl &&other) = delete;
Impl &operator=(Impl &&other) = delete;
Impl(const Impl &) = delete;
Impl &operator=(const Impl &) = delete;
Impl(Impl &&) = delete;
Impl &operator=(Impl &&) = delete;
~Impl() {
BN_clear_free(big_num);
}
@ -80,8 +80,8 @@ BigNum &BigNum::operator=(const BigNum &other) {
return *this;
}
BigNum::BigNum(BigNum &&other) noexcept = default;
BigNum &BigNum::operator=(BigNum &&other) noexcept = default;
BigNum::BigNum(BigNum &&) noexcept = default;
BigNum &BigNum::operator=(BigNum &&) noexcept = default;
BigNum::~BigNum() = default;
BigNum BigNum::from_binary(Slice str) {

View File

@ -19,8 +19,8 @@ namespace td {
class BigNumContext {
public:
BigNumContext();
BigNumContext(const BigNumContext &other) = delete;
BigNumContext &operator=(const BigNumContext &other) = delete;
BigNumContext(const BigNumContext &) = delete;
BigNumContext &operator=(const BigNumContext &) = delete;
BigNumContext(BigNumContext &&other) noexcept;
BigNumContext &operator=(BigNumContext &&other) noexcept;
~BigNumContext();

View File

@ -44,8 +44,8 @@ class CancellationTokenSource {
token_ = std::move(other.token_);
return *this;
}
CancellationTokenSource(const CancellationTokenSource &other) = delete;
CancellationTokenSource &operator=(const CancellationTokenSource &other) = delete;
CancellationTokenSource(const CancellationTokenSource &) = delete;
CancellationTokenSource &operator=(const CancellationTokenSource &) = delete;
~CancellationTokenSource() {
cancel();
}

View File

@ -16,10 +16,10 @@ namespace td {
class Destructor {
public:
Destructor() = default;
Destructor(const Destructor &other) = delete;
Destructor &operator=(const Destructor &other) = delete;
Destructor(Destructor &&other) = default;
Destructor &operator=(Destructor &&other) = default;
Destructor(const Destructor &) = delete;
Destructor &operator=(const Destructor &) = delete;
Destructor(Destructor &&) = default;
Destructor &operator=(Destructor &&) = default;
virtual ~Destructor() = default;
};
@ -28,10 +28,10 @@ class LambdaDestructor final : public Destructor {
public:
explicit LambdaDestructor(F &&f) : f_(std::move(f)) {
}
LambdaDestructor(const LambdaDestructor &other) = delete;
LambdaDestructor &operator=(const LambdaDestructor &other) = delete;
LambdaDestructor(LambdaDestructor &&other) = default;
LambdaDestructor &operator=(LambdaDestructor &&other) = default;
LambdaDestructor(const LambdaDestructor &) = delete;
LambdaDestructor &operator=(const LambdaDestructor &) = delete;
LambdaDestructor(LambdaDestructor &&) = default;
LambdaDestructor &operator=(LambdaDestructor &&) = default;
~LambdaDestructor() final {
f_();
}

View File

@ -18,20 +18,20 @@ namespace td {
template <class T>
class EpochBasedMemoryReclamation {
public:
EpochBasedMemoryReclamation(const EpochBasedMemoryReclamation &other) = delete;
EpochBasedMemoryReclamation &operator=(const EpochBasedMemoryReclamation &other) = delete;
EpochBasedMemoryReclamation(EpochBasedMemoryReclamation &&other) = delete;
EpochBasedMemoryReclamation &operator=(EpochBasedMemoryReclamation &&other) = delete;
EpochBasedMemoryReclamation(const EpochBasedMemoryReclamation &) = delete;
EpochBasedMemoryReclamation &operator=(const EpochBasedMemoryReclamation &) = delete;
EpochBasedMemoryReclamation(EpochBasedMemoryReclamation &&) = delete;
EpochBasedMemoryReclamation &operator=(EpochBasedMemoryReclamation &&) = delete;
~EpochBasedMemoryReclamation() = default;
class Locker {
public:
Locker(size_t thread_id, EpochBasedMemoryReclamation *ebmr) : thread_id_(thread_id), ebmr_(ebmr) {
}
Locker(const Locker &other) = delete;
Locker &operator=(const Locker &other) = delete;
Locker(Locker &&other) = default;
Locker &operator=(Locker &&other) = delete;
Locker(const Locker &) = delete;
Locker &operator=(const Locker &) = delete;
Locker(Locker &&) = default;
Locker &operator=(Locker &&) = delete;
~Locker() {
if (ebmr_) {

View File

@ -198,8 +198,8 @@ class FlatHashTable {
};
FlatHashTable() = default;
FlatHashTable(const FlatHashTable &other) = delete;
FlatHashTable &operator=(const FlatHashTable &other) = delete;
FlatHashTable(const FlatHashTable &) = delete;
FlatHashTable &operator=(const FlatHashTable &) = delete;
FlatHashTable(std::initializer_list<NodeT> nodes) {
if (nodes.size() == 0) {

View File

@ -25,10 +25,10 @@ class Gzip::Impl {
// z_stream is not copyable nor movable
Impl() = default;
Impl(const Impl &other) = delete;
Impl &operator=(const Impl &other) = delete;
Impl(Impl &&other) = delete;
Impl &operator=(Impl &&other) = delete;
Impl(const Impl &) = delete;
Impl &operator=(const Impl &) = delete;
Impl(Impl &&) = delete;
Impl &operator=(Impl &&) = delete;
~Impl() = default;
};

View File

@ -29,10 +29,10 @@ class HazardPointers {
}
}
}
HazardPointers(const HazardPointers &other) = delete;
HazardPointers &operator=(const HazardPointers &other) = delete;
HazardPointers(HazardPointers &&other) = delete;
HazardPointers &operator=(HazardPointers &&other) = delete;
HazardPointers(const HazardPointers &) = delete;
HazardPointers &operator=(const HazardPointers &) = delete;
HazardPointers(HazardPointers &&) = delete;
HazardPointers &operator=(HazardPointers &&) = delete;
class Holder {
public:
@ -44,10 +44,10 @@ class HazardPointers {
CHECK(hazard_ptr_.load() == 0);
hazard_ptr_.store(reinterpret_cast<T *>(1));
}
Holder(const Holder &other) = delete;
Holder &operator=(const Holder &other) = delete;
Holder(Holder &&other) = delete;
Holder &operator=(Holder &&other) = delete;
Holder(const Holder &) = delete;
Holder &operator=(const Holder &) = delete;
Holder(Holder &&) = delete;
Holder &operator=(Holder &&) = delete;
~Holder() {
clear();
}

View File

@ -222,7 +222,7 @@ class JsonScope {
jb_->scope_ = this;
CHECK(is_active());
}
JsonScope(const JsonScope &other) = delete;
JsonScope(const JsonScope &) = delete;
JsonScope(JsonScope &&other) noexcept : sb_(other.sb_), jb_(other.jb_), save_scope_(other.save_scope_) {
other.jb_ = nullptr;
}
@ -342,7 +342,7 @@ class JsonArrayScope final : public JsonScope {
jb->inc_offset();
*sb_ << "[";
}
JsonArrayScope(JsonArrayScope &&other) = default;
JsonArrayScope(JsonArrayScope &&) = default;
~JsonArrayScope() {
if (jb_) {
leave();
@ -383,7 +383,7 @@ class JsonObjectScope final : public JsonScope {
jb->inc_offset();
*sb_ << "{";
}
JsonObjectScope(JsonObjectScope &&other) = default;
JsonObjectScope(JsonObjectScope &&) = default;
~JsonObjectScope() {
if (jb_) {
leave();
@ -470,8 +470,8 @@ class JsonValue final : private Jsonable {
init(std::move(other));
return *this;
}
JsonValue(const JsonValue &other) = delete;
JsonValue &operator=(const JsonValue &other) = delete;
JsonValue(const JsonValue &) = delete;
JsonValue &operator=(const JsonValue &) = delete;
Type type() const {
return type_;

View File

@ -45,8 +45,8 @@ struct MapNode {
new (&second) ValueT(std::move(value));
DCHECK(!empty());
}
MapNode(const MapNode &other) = delete;
MapNode &operator=(const MapNode &other) = delete;
MapNode(const MapNode &) = delete;
MapNode &operator=(const MapNode &) = delete;
MapNode(MapNode &&other) noexcept {
*this = std::move(other);
}
@ -107,10 +107,10 @@ struct MapNode<KeyT, ValueT, typename std::enable_if_t<(sizeof(KeyT) + sizeof(Va
new (&second) ValueT(std::forward<ArgsT>(args)...);
DCHECK(!is_hash_table_key_empty(first));
}
Impl(const Impl &other) = delete;
Impl &operator=(const Impl &other) = delete;
Impl(Impl &&other) = delete;
void operator=(Impl &&other) = delete;
Impl(const Impl &) = delete;
Impl &operator=(const Impl &) = delete;
Impl(Impl &&) = delete;
void operator=(Impl &&) = delete;
~Impl() {
second.~ValueT();
}

View File

@ -217,10 +217,10 @@ class MpmcQueueOld {
node.release();
}
MpmcQueueOld(const MpmcQueueOld &other) = delete;
MpmcQueueOld &operator=(const MpmcQueueOld &other) = delete;
MpmcQueueOld(MpmcQueueOld &&other) = delete;
MpmcQueueOld &operator=(MpmcQueueOld &&other) = delete;
MpmcQueueOld(const MpmcQueueOld &) = delete;
MpmcQueueOld &operator=(const MpmcQueueOld &) = delete;
MpmcQueueOld(MpmcQueueOld &&) = delete;
MpmcQueueOld &operator=(MpmcQueueOld &&) = delete;
~MpmcQueueOld() {
auto *ptr = read_pos_.load(std::memory_order_relaxed);
while (ptr) {
@ -342,10 +342,10 @@ class MpmcQueue {
node.release();
}
MpmcQueue(const MpmcQueue &other) = delete;
MpmcQueue &operator=(const MpmcQueue &other) = delete;
MpmcQueue(MpmcQueue &&other) = delete;
MpmcQueue &operator=(MpmcQueue &&other) = delete;
MpmcQueue(const MpmcQueue &) = delete;
MpmcQueue &operator=(const MpmcQueue &) = delete;
MpmcQueue(MpmcQueue &&) = delete;
MpmcQueue &operator=(MpmcQueue &&) = delete;
~MpmcQueue() {
auto *ptr = read_pos_.load(std::memory_order_relaxed);
while (ptr) {

View File

@ -179,8 +179,8 @@ class ObjectPool {
ObjectPool() = default;
ObjectPool(const ObjectPool &) = delete;
ObjectPool &operator=(const ObjectPool &) = delete;
ObjectPool(ObjectPool &&other) = delete;
ObjectPool &operator=(ObjectPool &&other) = delete;
ObjectPool(ObjectPool &&) = delete;
ObjectPool &operator=(ObjectPool &&) = delete;
~ObjectPool() {
while (head_.load()) {
auto to_delete = head_.load();

View File

@ -105,10 +105,10 @@ class LambdaPromise : public PromiseInterface<ValueT> {
state_ = State::Complete;
}
}
LambdaPromise(const LambdaPromise &other) = delete;
LambdaPromise &operator=(const LambdaPromise &other) = delete;
LambdaPromise(LambdaPromise &&other) = default;
LambdaPromise &operator=(LambdaPromise &&other) = default;
LambdaPromise(const LambdaPromise &) = delete;
LambdaPromise &operator=(const LambdaPromise &) = delete;
LambdaPromise(LambdaPromise &&) = default;
LambdaPromise &operator=(LambdaPromise &&) = default;
~LambdaPromise() override {
if (state_.get() == State::Ready) {
do_error(Status::Error("Lost promise"));
@ -258,10 +258,10 @@ class SafePromise {
public:
SafePromise(Promise<T> promise, Result<T> result) : promise_(std::move(promise)), result_(std::move(result)) {
}
SafePromise(const SafePromise &other) = delete;
SafePromise &operator=(const SafePromise &other) = delete;
SafePromise(SafePromise &&other) = default;
SafePromise &operator=(SafePromise &&other) = default;
SafePromise(const SafePromise &) = delete;
SafePromise &operator=(const SafePromise &) = delete;
SafePromise(SafePromise &&) = default;
SafePromise &operator=(SafePromise &&) = default;
~SafePromise() {
if (promise_) {
promise_.set_result(std::move(result_));

View File

@ -18,10 +18,10 @@ namespace td {
class Guard {
public:
Guard() = default;
Guard(const Guard &other) = delete;
Guard &operator=(const Guard &other) = delete;
Guard(Guard &&other) = default;
Guard &operator=(Guard &&other) = default;
Guard(const Guard &) = delete;
Guard &operator=(const Guard &) = delete;
Guard(Guard &&) = default;
Guard &operator=(Guard &&) = default;
virtual ~Guard() = default;
virtual void dismiss() {
std::abort();
@ -35,12 +35,12 @@ class LambdaGuard final : public Guard {
}
explicit LambdaGuard(FunctionT &&func) : func_(std::move(func)) {
}
LambdaGuard(const LambdaGuard &other) = delete;
LambdaGuard &operator=(const LambdaGuard &other) = delete;
LambdaGuard(const LambdaGuard &) = delete;
LambdaGuard &operator=(const LambdaGuard &) = delete;
LambdaGuard(LambdaGuard &&other) : func_(std::move(other.func_)), dismissed_(other.dismissed_) {
other.dismissed_ = true;
}
LambdaGuard &operator=(LambdaGuard &&other) = delete;
LambdaGuard &operator=(LambdaGuard &&) = delete;
void dismiss() final {
dismissed_ = true;

View File

@ -34,8 +34,8 @@ struct SetNode {
}
explicit SetNode(KeyT key) : first(std::move(key)) {
}
SetNode(const SetNode &other) = delete;
SetNode &operator=(const SetNode &other) = delete;
SetNode(const SetNode &) = delete;
SetNode &operator=(const SetNode &) = delete;
SetNode(SetNode &&other) noexcept {
*this = std::move(other);
}
@ -78,10 +78,10 @@ struct SetNode<KeyT, typename std::enable_if_t<(sizeof(KeyT) > 28 * sizeof(void
explicit Impl(InputKeyT &&key) : first(std::forward<InputKeyT>(key)) {
DCHECK(!is_hash_table_key_empty(first));
}
Impl(const Impl &other) = delete;
Impl &operator=(const Impl &other) = delete;
Impl(Impl &&other) = delete;
void operator=(Impl &&other) = delete;
Impl(const Impl &) = delete;
Impl &operator=(const Impl &) = delete;
Impl(Impl &&) = delete;
void operator=(Impl &&) = delete;
};
using public_key_type = KeyT;

View File

@ -187,10 +187,10 @@ class SharedObjectPool {
using Ptr = detail::SharedPtr<DataT, Deleter>;
SharedObjectPool() = default;
SharedObjectPool(const SharedObjectPool &other) = delete;
SharedObjectPool &operator=(const SharedObjectPool &other) = delete;
SharedObjectPool(SharedObjectPool &&other) = delete;
SharedObjectPool &operator=(SharedObjectPool &&other) = delete;
SharedObjectPool(const SharedObjectPool &) = delete;
SharedObjectPool &operator=(const SharedObjectPool &) = delete;
SharedObjectPool(SharedObjectPool &&) = delete;
SharedObjectPool &operator=(SharedObjectPool &&) = delete;
~SharedObjectPool() {
free_queue_.pop_all(free_queue_reader_);
size_t free_cnt = 0;

View File

@ -32,13 +32,13 @@ class StackAllocator {
public:
Ptr(AllocatorImpl *allocator, size_t size) : allocator_(allocator), slice_(allocator_->allocate(size)) {
}
Ptr(const Ptr &other) = delete;
Ptr &operator=(const Ptr &other) = delete;
Ptr(const Ptr &) = delete;
Ptr &operator=(const Ptr &) = delete;
Ptr(Ptr &&other) noexcept : allocator_(other.allocator_), slice_(other.slice_) {
other.allocator_ = nullptr;
other.slice_ = MutableSlice();
}
Ptr &operator=(Ptr &&other) = delete;
Ptr &operator=(Ptr &&) = delete;
~Ptr();
MutableSlice as_slice() const {

View File

@ -49,8 +49,8 @@ class TlStorerToString {
public:
TlStorerToString() = default;
TlStorerToString(const TlStorerToString &other) = delete;
TlStorerToString &operator=(const TlStorerToString &other) = delete;
TlStorerToString(const TlStorerToString &) = delete;
TlStorerToString &operator=(const TlStorerToString &) = delete;
void store_field(const char *name, bool value) {
store_field_begin(name);

View File

@ -117,8 +117,8 @@ class BufferSlice {
: buffer_(std::move(buffer_ptr)), begin_(begin), end_(end) {
debug_track();
}
BufferSlice(const BufferSlice &other) = delete;
BufferSlice &operator=(const BufferSlice &other) = delete;
BufferSlice(const BufferSlice &) = delete;
BufferSlice &operator=(const BufferSlice &) = delete;
BufferSlice(BufferSlice &&other) noexcept : BufferSlice(std::move(other.buffer_), other.begin_, other.end_) {
debug_untrack(); // yes, debug_untrack
}

View File

@ -131,8 +131,8 @@ string sha512(Slice data) TD_WARN_UNUSED_RESULT;
class Sha256State {
public:
Sha256State();
Sha256State(const Sha256State &other) = delete;
Sha256State &operator=(const Sha256State &other) = delete;
Sha256State(const Sha256State &) = delete;
Sha256State &operator=(const Sha256State &) = delete;
Sha256State(Sha256State &&other) noexcept;
Sha256State &operator=(Sha256State &&other) noexcept;
~Sha256State();

View File

@ -42,8 +42,8 @@ class optional {
return *this;
}
optional(optional &&other) = default;
optional &operator=(optional &&other) = default;
optional(optional &&) = default;
optional &operator=(optional &&) = default;
~optional() = default;
explicit operator bool() const noexcept {
@ -89,8 +89,8 @@ struct optional<T, false> : optional<T, true> {
using optional<T, true>::optional;
optional(const optional &other) = delete;
optional &operator=(const optional &other) = delete;
optional(const optional &) = delete;
optional &operator=(const optional &) = delete;
optional(optional &&) = default;
optional &operator=(optional &&) = default;
~optional() = default;

View File

@ -91,8 +91,8 @@ Result<MemoryMapping> MemoryMapping::create_from_file(const FileFd &file_fd, con
#endif
}
MemoryMapping::MemoryMapping(MemoryMapping &&other) noexcept = default;
MemoryMapping &MemoryMapping::operator=(MemoryMapping &&other) noexcept = default;
MemoryMapping::MemoryMapping(MemoryMapping &&) noexcept = default;
MemoryMapping &MemoryMapping::operator=(MemoryMapping &&) noexcept = default;
MemoryMapping::~MemoryMapping() = default;
MemoryMapping::MemoryMapping(unique_ptr<Impl> impl) : impl_(std::move(impl)) {

View File

@ -37,8 +37,8 @@ class MemoryMapping {
Slice as_slice() const;
MutableSlice as_mutable_slice(); // returns empty slice if memory is read-only
MemoryMapping(const MemoryMapping &other) = delete;
const MemoryMapping &operator=(const MemoryMapping &other) = delete;
MemoryMapping(const MemoryMapping &) = delete;
const MemoryMapping &operator=(const MemoryMapping &) = delete;
MemoryMapping(MemoryMapping &&other) noexcept;
MemoryMapping &operator=(MemoryMapping &&other) noexcept;
~MemoryMapping();

View File

@ -38,8 +38,8 @@ namespace detail {
class ThreadPthread {
public:
ThreadPthread() = default;
ThreadPthread(const ThreadPthread &other) = delete;
ThreadPthread &operator=(const ThreadPthread &other) = delete;
ThreadPthread(const ThreadPthread &) = delete;
ThreadPthread &operator=(const ThreadPthread &) = delete;
ThreadPthread(ThreadPthread &&other) noexcept : is_inited_(std::move(other.is_inited_)), thread_(other.thread_) {
}
ThreadPthread &operator=(ThreadPthread &&other) noexcept {

View File

@ -35,8 +35,8 @@ namespace detail {
class ThreadStl {
public:
ThreadStl() = default;
ThreadStl(const ThreadStl &other) = delete;
ThreadStl &operator=(const ThreadStl &other) = delete;
ThreadStl(const ThreadStl &) = delete;
ThreadStl &operator=(const ThreadStl &) = delete;
ThreadStl(ThreadStl &&) = default;
ThreadStl &operator=(ThreadStl &&) = default;
~ThreadStl() {

View File

@ -40,8 +40,8 @@ class TlParser {
public:
explicit TlParser(Slice slice);
TlParser(const TlParser &other) = delete;
TlParser &operator=(const TlParser &other) = delete;
TlParser(const TlParser &) = delete;
TlParser &operator=(const TlParser &) = delete;
void set_error(const string &error_message);

View File

@ -22,8 +22,8 @@ class TlStorerUnsafe {
explicit TlStorerUnsafe(unsigned char *buf) : buf_(buf) {
}
TlStorerUnsafe(const TlStorerUnsafe &other) = delete;
TlStorerUnsafe &operator=(const TlStorerUnsafe &other) = delete;
TlStorerUnsafe(const TlStorerUnsafe &) = delete;
TlStorerUnsafe &operator=(const TlStorerUnsafe &) = delete;
template <class T>
void store_binary(const T &x) {
@ -97,8 +97,8 @@ class TlStorerCalcLength {
public:
TlStorerCalcLength() = default;
TlStorerCalcLength(const TlStorerCalcLength &other) = delete;
TlStorerCalcLength &operator=(const TlStorerCalcLength &other) = delete;
TlStorerCalcLength(const TlStorerCalcLength &) = delete;
TlStorerCalcLength &operator=(const TlStorerCalcLength &) = delete;
template <class T>
void store_binary(const T &x) {

View File

@ -21,8 +21,8 @@ class unique_ptr final {
using element_type = T;
unique_ptr() noexcept = default;
unique_ptr(const unique_ptr &other) = delete;
unique_ptr &operator=(const unique_ptr &other) = delete;
unique_ptr(const unique_ptr &) = delete;
unique_ptr &operator=(const unique_ptr &) = delete;
unique_ptr(unique_ptr &&other) noexcept : ptr_(other.release()) {
}
unique_ptr &operator=(unique_ptr &&other) noexcept {

View File

@ -31,8 +31,8 @@ class unique_value_ptr final {
}
return *this;
}
unique_value_ptr(unique_value_ptr &&other) noexcept = default;
unique_value_ptr &operator=(unique_value_ptr &&other) = default;
unique_value_ptr(unique_value_ptr &&) noexcept = default;
unique_value_ptr &operator=(unique_value_ptr &&) = default;
unique_value_ptr(std::nullptr_t) noexcept {
}
unique_value_ptr(unique_ptr<T> &&ptr) noexcept : ptr_(std::move(ptr)) {

View File

@ -163,7 +163,7 @@ class ConcurrentHashMapJunction {
ConcurrentHashMapJunction(const ConcurrentHashMapJunction &) = delete;
ConcurrentHashMapJunction &operator=(const ConcurrentHashMapJunction &) = delete;
ConcurrentHashMapJunction(ConcurrentHashMapJunction &&other) = delete;
ConcurrentHashMapJunction(ConcurrentHashMapJunction &&) = delete;
ConcurrentHashMapJunction &operator=(ConcurrentHashMapJunction &&) = delete;
~ConcurrentHashMapJunction() {
junction::DefaultQSBR.flush();