mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
constexpr in tcp_client_unix
This commit is contained in:
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…
Reference in New Issue
Block a user