diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-12-06 08:25:51 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-12-06 08:25:51 -0800 |
commit | 7b3382e6e10a34098eb3f3d97473eab47ac3ac94 (patch) | |
tree | d49fd662e499e6e2c123d52be10beda9b5f1d56d /starts/meaning-vm/level-1/baseref.hpp | |
parent | 1c69cfe93e07f1f7d6d8de6908a0a4caa1dce9bd (diff) | |
download | standingwithresilience-7b3382e6e10a34098eb3f3d97473eab47ac3ac94.tar.gz standingwithresilience-7b3382e6e10a34098eb3f3d97473eab47ac3ac94.zip |
some code around a timing concept
Diffstat (limited to 'starts/meaning-vm/level-1/baseref.hpp')
-rw-r--r-- | starts/meaning-vm/level-1/baseref.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/starts/meaning-vm/level-1/baseref.hpp b/starts/meaning-vm/level-1/baseref.hpp index 63045fa..6215225 100644 --- a/starts/meaning-vm/level-1/baseref.hpp +++ b/starts/meaning-vm/level-1/baseref.hpp @@ -25,9 +25,9 @@ struct baseref : public level0::baseref<ref> std::string const & name() const { return getname(self); } operator std::string const &() const { return getname(self); } - operator char const *() const { return getname(self)->data.c_str(); } + explicit operator char const *() const { return getname(self)->data.c_str(); } - ref operator-(ref other) { return hyphenate(self.ptr(), other.ptr()); } + ref operator-(ref other) const { return hyphenate(self, other); } template <typename T> void vset(ref const & type, T const & v) { self.set(type, level1::alloc(v)); } @@ -35,9 +35,9 @@ struct baseref : public level0::baseref<ref> template <typename... Ref> std::function<ref(Ref...)> & fun() { return self.template val<std::function<ref(Ref...)>>(); } template <typename... Ref> - void fun(std::function<ref(Ref...)> const & f) { val(f); } + void fun(std::function<ref(Ref...)> const & f) { self.val(f); } template <typename... Ref> - void fun(std::function<void(Ref...)> const & f) { val(voidtoret(f)); } + void fun(std::function<void(Ref...)> const & f) { self.val(voidtoret(f)); } template <typename... Ref> void fget(ref const & type) { return self.template vget<std::function<ref(Ref...)>>(type); } template <typename... Ref> |