fd/ops: Make flags optional
Many calls don't require them so don't require the user to specify them.
Change-Id: Ic2f386f2ae4257a9dbe8a5c5b6aaac116369f955
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/include-fd/stdplus/fd/ops.hpp b/include-fd/stdplus/fd/ops.hpp
index c77b6d6..c2def78 100644
--- a/include-fd/stdplus/fd/ops.hpp
+++ b/include-fd/stdplus/fd/ops.hpp
@@ -48,7 +48,7 @@
}
template <typename Container>
-inline auto recv(Fd& fd, Container&& c, RecvFlags flags)
+inline auto recv(Fd& fd, Container&& c, RecvFlags flags = {})
{
return detail::alignedOp(detail::recvAligned, fd,
std::forward<Container>(c), flags);
@@ -62,7 +62,7 @@
}
template <typename Container>
-inline auto send(Fd& fd, Container&& c, SendFlags flags)
+inline auto send(Fd& fd, Container&& c, SendFlags flags = {})
{
return detail::alignedOp(detail::sendAligned, fd,
std::forward<Container>(c), flags);
@@ -75,7 +75,7 @@
}
template <typename T>
-inline void recvExact(Fd& fd, T&& t, RecvFlags flags)
+inline void recvExact(Fd& fd, T&& t, RecvFlags flags = {})
{
detail::recvExact(fd, raw::asSpan<std::byte>(t), flags);
}
@@ -87,7 +87,7 @@
}
template <typename T>
-inline void sendExact(Fd& fd, T&& t, SendFlags flags)
+inline void sendExact(Fd& fd, T&& t, SendFlags flags = {})
{
detail::sendExact(fd, raw::asSpan<std::byte>(t), flags);
}