diff options
Diffstat (limited to 'src/strings/zstring.hpp')
-rw-r--r-- | src/strings/zstring.hpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/strings/zstring.hpp b/src/strings/zstring.hpp index 717da88..1e38662 100644 --- a/src/strings/zstring.hpp +++ b/src/strings/zstring.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_STRINGS_ZSTRING_HPP -#define TMWA_STRINGS_ZSTRING_HPP +#pragma once // strings/zstring.hpp - A borrowed tail slice of a string. // // Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com> @@ -19,12 +18,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -# include "../sanity.hpp" +#include "fwd.hpp" -# include <cstring> +#include "base.hpp" -# include "base.hpp" +namespace tmwa +{ namespace strings { /// A non-owning string that is guaranteed to be NUL-terminated. @@ -45,13 +45,10 @@ namespace strings ZString(const XString&) = delete; template<uint8_t n> ZString(const VString<n>& s); + ZString(const LString& s); // dangerous 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 RString *base_=nullptr); iterator begin() const; iterator end() const; @@ -64,11 +61,7 @@ namespace strings // Nope, it doesn't, since there's a template // Actually, it might now. const char *decay_for_printf(const ZString& zs); - - __attribute__((format(scanf, 2, 0))) - int do_vscan(ZString in, const char *fmt, va_list ap); } // namespace strings +} // namespace tmwa -# include "zstring.tcc" - -#endif // TMWA_STRINGS_ZSTRING_HPP +#include "zstring.tcc" |