diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-02-08 15:09:25 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-02-08 16:18:22 -0800 |
commit | 730e5dde39333cb2f63c72a7d7152bee5c4dbb05 (patch) | |
tree | 510ef3e0ad46ecf1f2bee1fa42f26e6377b51686 /src/strings/zstring.hpp | |
parent | 7a15a3efe85837d52d950cc9f895eadcc9eb6be1 (diff) | |
download | tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.tar.gz tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.tar.bz2 tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.tar.xz tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.zip |
Implement AString
Diffstat (limited to 'src/strings/zstring.hpp')
-rw-r--r-- | src/strings/zstring.hpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/strings/zstring.hpp b/src/strings/zstring.hpp index 72a227c..96aadc0 100644 --- a/src/strings/zstring.hpp +++ b/src/strings/zstring.hpp @@ -27,15 +27,16 @@ namespace strings { /// A non-owning string that is guaranteed to be NUL-terminated. /// This should be only used as a parameter. - class ZString : public _crtp_string<ZString, FString, ZPair> + class ZString : public _crtp_string<ZString, AString, ZPair> { iterator _b, _e; // optional - const FString *_base; + const RString *_base; public: ZString(); // no MString - ZString(const FString& s); + ZString(const RString& s); + ZString(const AString& s); ZString(const TString& s); ZString(const SString&) = delete; //ZString(ZString); @@ -43,16 +44,16 @@ namespace strings template<uint8_t n> ZString(const VString<n>& s); // dangerous - ZString(const char *b, const char *e, const FString *base_); - ZString(decltype(really_construct_from_a_pointer), const char *s, const FString *base_); + ZString(const char *b, const char *e, const RString *base_); + ZString(decltype(really_construct_from_a_pointer), const char *s, const RString *base_); template<size_t n> ZString(char (&s)[n]) = delete; template<size_t n> - ZString(const char (&s)[n], const FString *base_=nullptr); + ZString(const char (&s)[n], const RString *base_=nullptr); iterator begin() const; iterator end() const; - const FString *base() const; + const RString *base() const; const char *c_str() const; }; |