fix build
This commit is contained in:
parent
4b3536d211
commit
1baf418d21
1 changed files with 3 additions and 3 deletions
|
@ -232,15 +232,15 @@ struct static_string final {
|
||||||
|
|
||||||
constexpr const char* data() const noexcept { return chars.data(); }
|
constexpr const char* data() const noexcept { return chars.data(); }
|
||||||
|
|
||||||
constexpr std::size_t size() const noexcept { return chars.size(); }
|
constexpr std::size_t size() const noexcept { return N; }
|
||||||
|
|
||||||
constexpr operator std::string_view() const noexcept { return {data(), size()}; }
|
constexpr operator std::string_view() const noexcept { return {data(), size()}; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <std::size_t... I>
|
template <std::size_t... I>
|
||||||
constexpr static_string(std::string_view str, std::index_sequence<I...>) noexcept : chars{{str[I]...}} {}
|
constexpr static_string(std::string_view str, std::index_sequence<I...>) noexcept : chars{{str[I]..., '\0'}} {}
|
||||||
|
|
||||||
const std::array<char, N> chars;
|
const std::array<char, N + 1> chars;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|
Loading…
Reference in a new issue