constexpr in tcp_client_unix

This commit is contained in:
gabime 2024-05-03 18:34:16 +03:00
parent 06be4409e6
commit 8d81cca86c

View File

@ -61,9 +61,9 @@ public:
int last_errno = 0;
for (auto *rp = addrinfo_result; rp != nullptr; rp = rp->ai_next) {
#if defined(SOCK_CLOEXEC)
const int flags = SOCK_CLOEXEC;
constexpr int flags = SOCK_CLOEXEC;
#else
const int flags = 0;
constexpr int flags = 0;
#endif
socket_ = ::socket(rp->ai_family, rp->ai_socktype | flags, rp->ai_protocol);
if (socket_ == -1) {