net/addr/ip: Remove extra char array
We don't reference the char data, so throw it away as the compiler
thinks it encounters non-constexpr data if we use the copy.
Change-Id: I9faf6b5355bd53a96a9c4a2e25771129a77d6c63
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/include/stdplus/net/addr/ip.hpp b/include/stdplus/net/addr/ip.hpp
index 0323e7d..2236285 100644
--- a/include/stdplus/net/addr/ip.hpp
+++ b/include/stdplus/net/addr/ip.hpp
@@ -493,15 +493,13 @@
template <typename Addr, typename CharT, std::size_t N>
struct CompileInAddr : CompileInAddrInt<Addr>
{
- CharT str[N - 1];
static inline void notNullTerminated() {}
constexpr CompileInAddr(const CharT (&str)[N]) noexcept
{
if (str[N - 1] != '\0')
notNullTerminated();
- std::copy(str, str + N - 1, this->str);
- this->compile(std::basic_string_view{this->str, N - 1});
+ this->compile(std::basic_string_view{str, N - 1});
}
};