From dc9cc9aa0754d834388acabb5a68677f6512b960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 5 Jan 2023 20:17:57 +0100 Subject: cpp: Expliticly declare compiler generated copy constructors * lang/cpp/src/configuration.h (Component, Option), lang/cpp/src/data.h (Data), lang/cpp/src/decryptionresult.h (DecryptionResult, DecryptionResult::Recipient), lang/cpp/src/encryptionresult.h (EncryptionResult, InvalidRecipient), lang/cpp/src/engineinfo.h (EngineInfo), lang/cpp/src/importresult.h (ImportResult, Import), lang/cpp/src/key.h (Key, Subkey, UserID, UserID::Signature), lang/cpp/src/keygenerationresult.h (KeyGenerationResult), lang/cpp/src/keylistresult.h (KeyListResult), lang/cpp/src/notation.h (Notation), lang/cpp/src/signingresult.h (SigningResult, InvalidSigningKey, CreatedSignature), lang/cpp/src/swdbresult.h (SwdbResult), lang/cpp/src/tofuinfo.h (TofuInfo), lang/cpp/src/verificationresult.h (VerificationResult, Signature), lang/cpp/src/vfsmountresult.h (VfsMountResult): Explitily declare compiler generated copy constructor. -- This fixes "implicitly-declared copy constructor is deprecated" warnings. --- lang/cpp/src/key.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lang/cpp/src/key.h') diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index 0e6380db..09f1879f 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -71,6 +71,7 @@ public: static const Null null; + Key(const Key &other) = default; const Key &operator=(Key other) { swap(other); @@ -228,6 +229,7 @@ public: Subkey(const shared_gpgme_key_t &key, gpgme_sub_key_t subkey); Subkey(const shared_gpgme_key_t &key, unsigned int idx); + Subkey(const Subkey &other) = default; const Subkey &operator=(Subkey other) { swap(other); @@ -341,6 +343,7 @@ public: UserID(const shared_gpgme_key_t &key, gpgme_user_id_t uid); UserID(const shared_gpgme_key_t &key, unsigned int idx); + UserID(const UserID &other) = default; const UserID &operator=(UserID other) { swap(other); @@ -459,6 +462,7 @@ public: Signature(const shared_gpgme_key_t &key, gpgme_user_id_t uid, gpgme_key_sig_t sig); Signature(const shared_gpgme_key_t &key, gpgme_user_id_t uid, unsigned int idx); + Signature(const Signature &other) = default; const Signature &operator=(Signature other) { swap(other); -- cgit v1.2.3