commit | 22a6f52556db9b07dd923adfc47e65d3aecc0509 | [log] [tgz] |
---|---|---|
author | William A. Kennington III <wak@google.com> | Wed Jan 10 17:38:14 2024 -0800 |
committer | William A. Kennington III <wak@google.com> | Wed Jan 10 17:38:37 2024 -0800 |
tree | 3eb8a8ee75516fc5a3a4b0eb9319041645d9fb00 | |
parent | 4aec6d10d8b0d4f00f4588ae07e4f2a75003794a [diff] [blame] |
fd: Make it possible to test fd existence Change-Id: I85f205bd97c4168729961c68ad74ec15eda1cd12 Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/fd/managed.cpp b/src/fd/managed.cpp index 5669903..b9cfa87 100644 --- a/src/fd/managed.cpp +++ b/src/fd/managed.cpp
@@ -55,5 +55,10 @@ return handle.value(); } +ManagedFd::operator bool() const noexcept +{ + return static_cast<bool>(handle); +} + } // namespace fd } // namespace stdplus