From fe51b5bb71f7eadf6072a51c31c0ffee91c815c8 Mon Sep 17 00:00:00 2001 From: olpc user Date: Mon, 23 Dec 2019 13:11:16 -0800 Subject: some bugfixes --- starts/meaning-vm/level-0/baseref.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'starts/meaning-vm/level-0') diff --git a/starts/meaning-vm/level-0/baseref.hpp b/starts/meaning-vm/level-0/baseref.hpp index d20b22a..9244492 100644 --- a/starts/meaning-vm/level-0/baseref.hpp +++ b/starts/meaning-vm/level-0/baseref.hpp @@ -68,6 +68,17 @@ public: concept*& ptr() { return p; } concept* const & ptr() const { return p; } + operator level0::ref const &() const { return *reinterpret_cast(this); } + operator level1::ref const &() const { return *reinterpret_cast(this); } + operator level2::ref const &() const { return *reinterpret_cast(this); } + operator level3::ref const &() const { return *reinterpret_cast(this); } + operator level4::ref const &() const { return *reinterpret_cast(this); } + operator level5::ref const &() const { return *reinterpret_cast(this); } + operator level6::ref const &() const { return *reinterpret_cast(this); } + operator level7::ref const &() const { return *reinterpret_cast(this); } + operator level8::ref const &() const { return *reinterpret_cast(this); } + operator level9::ref const &() const { return *reinterpret_cast(this); } + operator level0::ref &() { return *reinterpret_cast(this); } operator level1::ref &() { return *reinterpret_cast(this); } operator level2::ref &() { return *reinterpret_cast(this); } -- cgit v1.2.3