/* Zeta API - Z/classes/SizedString.hpp ______ ______________ ___ |__ / | ___|___ ___|/ \ / /__| __| | | / - \ /______|_____| |__| /__/ \__\ Copyright (C) 2006-2024 Manuel Sainz de Baranda y Goñi. Released under the terms of the GNU Lesser General Public License v3. */ #ifndef Z_classes_SizedString_HPP #define Z_classes_SizedString_HPP #include #include namespace Zeta{namespace ZetaDetail { template > struct SizedString; template struct SizedString > { t data[s]; Z_CT(CPP11) SizedString(const t (&string)[s]) Z_NOTHROW : data{string[i]..., 0} {} Z_CT(CPP11) SizedString(const StringView &string_view) Z_NOTHROW : data{string_view.data[i]..., 0} {} }; }} namespace Zeta{template struct SizedString : ZetaDetail::SizedString { Z_CT(CPP11) SizedString(const t (&string)[s]) Z_NOTHROW : ZetaDetail::SizedString(string) {} Z_CT(CPP11) SizedString(const StringView &string_view) Z_NOTHROW : ZetaDetail::SizedString(string_view) {} Z_CT(CPP11) operator const t *() const Z_NOTHROW {return this->data;} Z_CT(CPP11) const t &operator [](USize index) const Z_NOTHROW {return this->data[index];} };} #endif // Z_classes_SizedString_HPP