summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-0/baseref.hpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 17:35:09 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 17:35:09 -0800
commit8172f109ed55b8a02e7e498566b7ba12e346f7e2 (patch)
treed23b6279d34b03d7cebc987808c74a3cf49cecf8 /starts/meaning-vm/level-0/baseref.hpp
parent684ac69af192670bb6547ec01df19a3159e7d8e6 (diff)
downloadstandingwithresilience-8172f109ed55b8a02e7e498566b7ba12e346f7e2.tar.gz
standingwithresilience-8172f109ed55b8a02e7e498566b7ba12e346f7e2.zip
add vset
Diffstat (limited to 'starts/meaning-vm/level-0/baseref.hpp')
-rw-r--r--starts/meaning-vm/level-0/baseref.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/starts/meaning-vm/level-0/baseref.hpp b/starts/meaning-vm/level-0/baseref.hpp
index bdfd065..b68de24 100644
--- a/starts/meaning-vm/level-0/baseref.hpp
+++ b/starts/meaning-vm/level-0/baseref.hpp
@@ -2,6 +2,7 @@
#include "common.hpp"
#include "errors.hpp"
+#include "memorystore.hpp"
#include <map>
#include <vector>
@@ -37,6 +38,8 @@ public:
template <typename T>
T& vget(ref const & type) const { return p->vget<T>(type.p)->data; }
+ template <typename T>
+ void vset(ref const & type, T const & v) { p->set(type.p, valloc<T>(v)); }
template <typename T>
T& val() { return p->val<T>()->data; }