handle/managed: Implement non-copyable handle
This is a generic handle type that holds a resource and uses RAII to
call a user defined function when the resource is destroyed. A future
change will implement a smart file descriptor based on this interface.
A follow up change will implement the copyable version.
Tested:
Built and run through unit tests.
Change-Id: Ia8da1d662319e8fb58380ed4979bcf1b74f66dfb
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 1c4a5a1..45f54f4 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -7,6 +7,11 @@
check_PROGRAMS =
TESTS = $(check_PROGRAMS)
+check_PROGRAMS += handle/managed
+handle_managed_SOURCES = handle/managed.cpp
+handle_managed_CPPFLAGS = $(gtest_cppflags)
+handle_managed_LDADD = $(gtest_ldadd)
+
check_PROGRAMS += signal
signal_SOURCES = signal.cpp
signal_CPPFLAGS = $(gtest_cppflags)