add and fix -Wdeprecated-copy

*so* many warnings, from only two definitions

Change-Id: If2561cd500c05a1e33cce984faf9f3e42a8a95ac
This commit is contained in:
Qyriad 2024-05-08 18:50:03 -06:00
parent 010bbd1b0e
commit 2bbe3efd16
3 changed files with 5 additions and 0 deletions

View file

@ -405,6 +405,7 @@ add_project_arguments(
'-Wimplicit-fallthrough', '-Wimplicit-fallthrough',
'-Werror=switch', '-Werror=switch',
'-Werror=switch-enum', '-Werror=switch-enum',
'-Wdeprecated-copy',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked # Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked
# at ~1% overhead in `nix search`. # at ~1% overhead in `nix search`.
# #

View file

@ -185,6 +185,8 @@ public:
HintFmt(const HintFmt & hf) : fmt(hf.fmt) {} HintFmt(const HintFmt & hf) : fmt(hf.fmt) {}
HintFmt & operator=(HintFmt const & rhs) = default;
std::string str() const std::string str() const
{ {
return fmt.str(); return fmt.str();

View file

@ -77,6 +77,8 @@ public:
return ref<T2>((std::shared_ptr<T2>) p); return ref<T2>((std::shared_ptr<T2>) p);
} }
ref<T> & operator=(ref<T> const & rhs) = default;
bool operator == (const ref<T> & other) const bool operator == (const ref<T> & other) const
{ {
return p == other.p; return p == other.p;