diff --git a/Jupiter/Readable_String.h b/Jupiter/Readable_String.h index 83c7485..104c7e0 100644 --- a/Jupiter/Readable_String.h +++ b/Jupiter/Readable_String.h @@ -173,6 +173,9 @@ namespace Jupiter */ size_t println(FILE *out) const; size_t println(std::basic_ostream &out) const; + + /** Access operator */ + inline T &operator[](size_t index) const { return this->get(index); }; }; } diff --git a/Jupiter/String_Type.h b/Jupiter/String_Type.h index 7e6e84e..a8a5a6b 100644 --- a/Jupiter/String_Type.h +++ b/Jupiter/String_Type.h @@ -184,9 +184,6 @@ namespace Jupiter template class R> static R gotoWord(const Jupiter::String_Type &in, size_t pos, const T *whitespace); template class R> static R gotoWord(const T *in, size_t pos, const T *whitespace); - /** Access operator */ - inline T &operator[](size_t index) { return Jupiter::String_Type::get(index); }; - /** Mutative operators */ inline String_Type &operator+=(const String_Type &right) { this->concat(right); return *this; }; inline String_Type &operator+=(const std::basic_string &right) { this->concat(right); return *this; };