From 0090ca97ee48939bb1d4ce949805e22c0c781202 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Fri, 12 Mar 2021 07:03:25 -0600 Subject: [PATCH] fix: missing copy assignment operator (#120) Explicitly list default copy assignment operator otherwise it is deleted in gcc 8.3. --- include/sdbus-c++/Types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sdbus-c++/Types.h b/include/sdbus-c++/Types.h index 6630bd8..addeca8 100644 --- a/include/sdbus-c++/Types.h +++ b/include/sdbus-c++/Types.h @@ -155,6 +155,7 @@ namespace sdbus { using std::string::string; ObjectPath() = default; // Fixes gcc 6.3 error (default c-tor is not imported in above using declaration) ObjectPath(const ObjectPath&) = default; // Fixes gcc 8.3 error (deleted copy constructor) + ObjectPath& operator = (const ObjectPath&) = default; // Fixes gcc 8.3 error (deleted copy assignment) ObjectPath(std::string path) : std::string(std::move(path)) {} @@ -173,6 +174,7 @@ namespace sdbus { using std::string::string; Signature() = default; // Fixes gcc 6.3 error (default c-tor is not imported in above using declaration) Signature(const Signature&) = default; // Fixes gcc 8.3 error (deleted copy constructor) + Signature& operator = (const Signature&) = default; // Fixes gcc 8.3 error (deleted copy assignment) Signature(std::string path) : std::string(std::move(path)) {}