constexpr in tcp_client_unix

pull/3113/head
gabime 1 year ago
parent 06be4409e6
commit 8d81cca86c

@ -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) {

Loading…
Cancel
Save