diff options
Diffstat (limited to 'starts/meaning-vm/level-0/vref.hpp')
-rw-r--r-- | starts/meaning-vm/level-0/vref.hpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/starts/meaning-vm/level-0/vref.hpp b/starts/meaning-vm/level-0/vref.hpp deleted file mode 100644 index 1eb701d..0000000 --- a/starts/meaning-vm/level-0/vref.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include "common.hpp" -#include "memorystore.hpp" -#include "ref.hpp" -#include "value.hpp" - -namespace intellect { -namespace level0 { - -template <typename T> -struct vref -{ - vref(value<T> *p) : ptr(p) { } - value<T>* operator->() { return ptr; } - operator T const &() const { return *ptr; } - - vref(T const & val) : vref(alloc(new value<T>(val))) { } - - 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; -}; - - -} -} |