summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-0/vref.hpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-24 19:23:37 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-24 19:23:37 -0800
commitcd03e291664cb102bde61d86a15f0add11809766 (patch)
tree9afb4bc872236b95debd5e20daf00797c563c666 /starts/meaning-vm/level-0/vref.hpp
parentdbbed1e4e1d4b3f268c71236c89f1d673fa0c165 (diff)
downloadstandingwithresilience-cd03e291664cb102bde61d86a15f0add11809766.tar.gz
standingwithresilience-cd03e291664cb102bde61d86a15f0add11809766.zip
messy but works. rushing to get this done with may have been a poor investment.
Diffstat (limited to 'starts/meaning-vm/level-0/vref.hpp')
-rw-r--r--starts/meaning-vm/level-0/vref.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/starts/meaning-vm/level-0/vref.hpp b/starts/meaning-vm/level-0/vref.hpp
index cffc8f5..1eb701d 100644
--- a/starts/meaning-vm/level-0/vref.hpp
+++ b/starts/meaning-vm/level-0/vref.hpp
@@ -17,13 +17,14 @@ struct vref
vref(T const & val) : vref(alloc(new value<T>(val))) { }
- vref(ref const & other) : ptr(static_cast<value<T>*>(other.ptr)) { }
+ vref(ref const & other) : ptr(static_cast<value<T>*>((concept*)other)) { }
operator ref() { return ptr; }
T const & val() { return *ptr; }
// for use by containers
bool operator<(vref<T> const & other) const { return self.ptr < other.ptr; }
+protected:
value<T> * const ptr;
};