about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/value.hh
diff options
context:
space:
mode:
authorKane York <kanepyork@gmail.com>2020-08-13T23·51-0700
committerkanepyork <rikingcoding@gmail.com>2020-08-17T02·23+0000
commit38f2ea34f466d8264f7a060627eece5b3cbc40ba (patch)
treeb7acbd7e206643719990e5f0b9a78294ed268696 /third_party/nix/src/libexpr/value.hh
parentcbebc75d94f02659c8d90211fa6acd16c606e6a4 (diff)
refactor(tvix): add explicit copy/move constructors for Value r/1657
This is in preparation for making some of Value's members into refcounted ('smart') pointers.

Change-Id: Ibc54e23ac35766a2fd4e14871c9a7c936a603778
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1743
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/libexpr/value.hh')
-rw-r--r--third_party/nix/src/libexpr/value.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh
index 6bb694d1830b..85ce9e7a1ba0 100644
--- a/third_party/nix/src/libexpr/value.hh
+++ b/third_party/nix/src/libexpr/value.hh
@@ -105,6 +105,13 @@ struct Value {
     NixFloat fpoint;
   };
 
+  Value() : type(tInt), integer(0) {}
+  Value(const Value& copy);
+  Value(Value&& move);
+  ~Value() {}
+  Value& operator=(const Value& copy);
+  Value& operator=(Value&& move);
+
   bool isList() const { return type == tList; }
 
   size_t listSize() const { return list->size(); }