From e788bba4bfcb6cb7d21f607bb5bf93213fb1a334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 8 Jan 2023 18:35:49 +0100 Subject: Enable move constructor and move assignment for Watched template Was not implicitly defined because of explicit destructor. --- include/erebos/frp.h | 6 ++++++ include/erebos/sync.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include/erebos') diff --git a/include/erebos/frp.h b/include/erebos/frp.h index 5fc88f6..28a8f63 100644 --- a/include/erebos/frp.h +++ b/include/erebos/frp.h @@ -62,6 +62,12 @@ template class Watched { public: + Watched() = default; + Watched(const Watched &) = default; + Watched & operator=(const Watched &) = default; + Watched(Watched &&) = default; + Watched & operator=(Watched &&) = default; + Watched(shared_ptr> && cb): cb(move(cb)) {} ~Watched(); diff --git a/include/erebos/sync.h b/include/erebos/sync.h index dad4e0e..1ab927d 100644 --- a/include/erebos/sync.h +++ b/include/erebos/sync.h @@ -28,7 +28,7 @@ private: void localStateWatcher(const vector &); const class Server * server; - std::optional>> watchedLocal; + Watched> watchedLocal; }; } -- cgit v1.2.3