aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build1
-rw-r--r--src/libutil/fmt.hh2
-rw-r--r--src/libutil/ref.hh2
3 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 6231175e6..e90bf213b 100644
--- a/meson.build
+++ b/meson.build
@@ -405,6 +405,7 @@ add_project_arguments(
'-Wimplicit-fallthrough',
'-Werror=switch',
'-Werror=switch-enum',
+ '-Wdeprecated-copy',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked
# at ~1% overhead in `nix search`.
#
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh
index aa7c6926a..df4492993 100644
--- a/src/libutil/fmt.hh
+++ b/src/libutil/fmt.hh
@@ -185,6 +185,8 @@ public:
HintFmt(const HintFmt & hf) : fmt(hf.fmt) {}
+ HintFmt & operator=(HintFmt const & rhs) = default;
+
std::string str() const
{
return fmt.str();
diff --git a/src/libutil/ref.hh b/src/libutil/ref.hh
index 5d0c3696d..03aa64273 100644
--- a/src/libutil/ref.hh
+++ b/src/libutil/ref.hh
@@ -77,6 +77,8 @@ public:
return ref<T2>((std::shared_ptr<T2>) p);
}
+ ref<T> & operator=(ref<T> const & rhs) = default;
+
bool operator == (const ref<T> & other) const
{
return p == other.p;