From 1baf418d21dec436607bc83e8c35e965dbb67ea0 Mon Sep 17 00:00:00 2001 From: neargye Date: Thu, 3 Oct 2019 18:39:54 +0500 Subject: [PATCH] fix build --- include/nameof.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nameof.hpp b/include/nameof.hpp index 649ca31..b25141d 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -232,15 +232,15 @@ struct static_string final { 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()}; } private: template - constexpr static_string(std::string_view str, std::index_sequence) noexcept : chars{{str[I]...}} {} + constexpr static_string(std::string_view str, std::index_sequence) noexcept : chars{{str[I]..., '\0'}} {} - const std::array chars; + const std::array chars; }; template <>