fd: Implement managed file descriptor support

Change-Id: I0c5c438aa2c31ae52e115951b3fb1e85df182fd1
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/fd/ops.cpp b/test/fd/ops.cpp
new file mode 100644
index 0000000..2d52101
--- /dev/null
+++ b/test/fd/ops.cpp
@@ -0,0 +1,17 @@
+#include <gtest/gtest.h>
+#include <stdplus/fd/ops.hpp>
+
+namespace stdplus
+{
+namespace fd
+{
+
+TEST(Flags, Flags)
+{
+    FdFlags f = FdFlags(0).set(FdFlag::CloseOnExec).unset(FdFlag::CloseOnExec);
+    f.set(FdFlag::CloseOnExec).unset(FdFlag::CloseOnExec);
+    EXPECT_EQ(0, static_cast<int>(f));
+}
+
+} // namespace fd
+} // namespace stdplus