fix: missing copy assignment operator (#120)

Explicitly list default copy assignment operator otherwise it is deleted in gcc 8.3.
This commit is contained in:
Michael Davis
2021-03-12 07:03:25 -06:00
committed by GitHub
parent a649a0225e
commit 0090ca97ee

View File

@ -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))
{}