net/SocketAddress: add #ifdefs for std::span
This commit is contained in:
@@ -131,6 +131,8 @@ SocketAddress::GetPort() const noexcept
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cpp_lib_span
|
||||
|
||||
static std::span<const std::byte>
|
||||
GetSteadyPart(const struct sockaddr_in &address) noexcept
|
||||
{
|
||||
@@ -149,7 +151,11 @@ GetSteadyPart(const struct sockaddr_in6 &address) noexcept
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // __cpp_lib_span
|
||||
|
||||
#endif // HAVE_TCP
|
||||
|
||||
#ifdef __cpp_lib_span
|
||||
|
||||
std::span<const std::byte>
|
||||
SocketAddress::GetSteadyPart() const noexcept
|
||||
@@ -175,3 +181,5 @@ SocketAddress::GetSteadyPart() const noexcept
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user