diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-11-22 06:28:03 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-11-22 06:28:03 -0800 |
commit | 018ced49ce429b123cbf63534d75f16ca91a96c2 (patch) | |
tree | a6c34ea9310bd3399392555b2d685e2fd4c8743f /starts/meaning-vm/concept.hpp | |
parent | 55f586437b52bda32793a376f8ea5df9fb1b89e2 (diff) | |
download | standingwithresilience-018ced49ce429b123cbf63534d75f16ca91a96c2.tar.gz standingwithresilience-018ced49ce429b123cbf63534d75f16ca91a96c2.zip |
decl references in one expression
Diffstat (limited to 'starts/meaning-vm/concept.hpp')
-rw-r--r-- | starts/meaning-vm/concept.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/starts/meaning-vm/concept.hpp b/starts/meaning-vm/concept.hpp index a2dcc2c..a80b157 100644 --- a/starts/meaning-vm/concept.hpp +++ b/starts/meaning-vm/concept.hpp @@ -12,11 +12,14 @@ struct ref { ref(concept *p) : ptr(p) { } concept* operator->() { return ptr; } + + // for use by containers bool operator<(ref const & other) const { return ptr < other.ptr; } - // helper names + // for helpers ref(std::string const &); ref(char const * str) : ref(std::string(str)) { } + ref() : ref("nothing") { } value<std::string> & name() const; operator const char *() const; |