summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-0/vref.hpp
diff options
context:
space:
mode:
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;
};