From 6ed211328ecd0ea83b7a7742f9962f0b21c8642d Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 15 Oct 2020 09:39:35 +0200 Subject: [PATCH] make AddrFuncType in IpTraits an inline static variable rather than a constexpr one (close #226) --- src/uvw/util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uvw/util.h b/src/uvw/util.h index 49112da9..72c3ca31 100644 --- a/src/uvw/util.h +++ b/src/uvw/util.h @@ -370,8 +370,8 @@ struct IpTraits { using Type = sockaddr_in; using AddrFuncType = int(*)(const char *, int, Type *); using NameFuncType = int(*)(const Type *, char *, std::size_t); - static constexpr AddrFuncType addrFunc = &uv_ip4_addr; - static constexpr NameFuncType nameFunc = &uv_ip4_name; + inline static const AddrFuncType addrFunc = &uv_ip4_addr; + inline static const NameFuncType nameFunc = &uv_ip4_name; static constexpr auto sinPort(const Type *addr) { return addr->sin_port; } }; @@ -381,8 +381,8 @@ struct IpTraits { using Type = sockaddr_in6; using AddrFuncType = int(*)(const char *, int, Type *); using NameFuncType = int(*)(const Type *, char *, std::size_t); - static constexpr AddrFuncType addrFunc = &uv_ip6_addr; - static constexpr NameFuncType nameFunc = &uv_ip6_name; + inline static const AddrFuncType addrFunc = &uv_ip6_addr; + inline static const NameFuncType nameFunc = &uv_ip6_name; static constexpr auto sinPort(const Type *addr) { return addr->sin6_port; } };