Fix build with gcc8.3

sdbus::ObjectPath and sdbus::Signature copy constructors are implicitly
declared as deleted when compiling with Linaro's ARM toolchain [1] gcc8.3.
Explicitly listing the copy constructors for affected classes fixes the problem.

[1] https://www.linaro.org/
This commit is contained in:
Tomas Pecka
2020-07-16 14:41:21 +02:00
committed by Stanislav Angelovič
parent 175c43ec53
commit c1c4512f9f

View File

@ -154,6 +154,7 @@ namespace sdbus {
public:
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(std::string path)
: std::string(std::move(path))
{}
@ -171,6 +172,7 @@ namespace sdbus {
public:
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(std::string path)
: std::string(std::move(path))
{}