summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-0/ref.hpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 05:02:10 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 05:02:10 -0800
commit520119a6f6ed418b8ae45bfde8239bbb532562cd (patch)
tree6cc381877adb5ddfaf131415c64f87eca5649676 /starts/meaning-vm/level-0/ref.hpp
parentcd03e291664cb102bde61d86a15f0add11809766 (diff)
downloadstandingwithresilience-520119a6f6ed418b8ae45bfde8239bbb532562cd.tar.gz
standingwithresilience-520119a6f6ed418b8ae45bfde8239bbb532562cd.zip
cleanup mixin pointer mess for refs
Diffstat (limited to 'starts/meaning-vm/level-0/ref.hpp')
-rw-r--r--starts/meaning-vm/level-0/ref.hpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/starts/meaning-vm/level-0/ref.hpp b/starts/meaning-vm/level-0/ref.hpp
index abe3897..87a37c6 100644
--- a/starts/meaning-vm/level-0/ref.hpp
+++ b/starts/meaning-vm/level-0/ref.hpp
@@ -1,29 +1,22 @@
#pragma once
#include "common.hpp"
-#include "ref-mixin.hpp"
+#include "baseref.hpp"
#include <string>
namespace intellect {
namespace level0 {
-struct ref : public refmixin<ref, vref>
+struct ref : public baseref<ref, vref, concept>
{
- ref(concept *p);
- ref(ref const & other) : ref(other.ptr) { }
- ref & operator=(ref const & other) { self.ptr = other.ptr; return self; }
- operator concept*() const { return ptr; }
- concept* operator->() const { return ptr; }
- concept & deref() { return *ptr; }
+ ref(concept *p) : baseref(p) { }
+ ref & operator=(ref const & other) { self.p = other.p; return self; }
ref & l0() { return self; }
ref const & l0() const { return self; }
std::string dump(ref skipmarkertype, ref skipmarkertarget);
-
-private:
- concept * ptr;
};
}