From f7fc0378fccf172c9791f69b7e14d915b6f4d05b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 27 Dec 2023 01:36:29 +0200 Subject: [PATCH] Make move constructors explicitly declared for MSVC's benefit When exporting classes it wants to export all the special members, even if some of them are invalid due to the types of data members. A user- declared move constructor disables the implicit copy constructor so things will work correctly. --- source/collection.h | 2 ++ source/packsource.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/source/collection.h b/source/collection.h index f2e156e..254c7b6 100644 --- a/source/collection.h +++ b/source/collection.h @@ -332,6 +332,8 @@ protected: std::vector> extractors; CollectionItemTypeBase() = default; + CollectionItemTypeBase(CollectionItemTypeBase &&) = default; + CollectionItemTypeBase &operator=(CollectionItemTypeBase &&) = default; void set_keyword(const std::string &); void add_suffix(const std::string &); diff --git a/source/packsource.h b/source/packsource.h index aea3b68..d7bec4a 100644 --- a/source/packsource.h +++ b/source/packsource.h @@ -116,6 +116,10 @@ private: ObjectMap objects; public: + PackSource() = default; + PackSource(PackSource &&) = default; + PackSource &operator=(PackSource &&) = default; + /// Adds a pack file to load objects from. The index is read immediately. void add_pack_file(const std::string &); -- 2.45.2