X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b3139bf3f37b3b0244efea8b4b5e5a7d0bc90095..3c830ad0bc5107acead026251cadd71d08a28308:/include/stg/resetable.h?ds=inline

diff --git a/include/stg/resetable.h b/include/stg/resetable.h
index c78d0247..a451b357 100644
--- a/include/stg/resetable.h
+++ b/include/stg/resetable.h
@@ -42,6 +42,19 @@ public:
     const T & data() const throw() { return value; }
     bool empty() const throw() { return !is_set; }
     void reset() throw() { is_set = false; }
+    void splice(const RESETABLE<T> & rhs)
+    {
+        if (rhs.is_set)
+        {
+            value = rhs.value;
+            is_set = true;
+        }
+    }
+    void maybeSet(value_type& dest) const
+    {
+        if (is_set)
+            dest = value;
+    }
 
 private:
     value_type value;