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>
7 files changed
tree: 9553542506b77601755b0f548c2fe48031198a62
  1. example/
  2. src/
  3. test/
  4. .clang-format
  5. .gitignore
  6. .lcovrc
  7. bootstrap.sh
  8. configure.ac
  9. LICENSE
  10. MAINTAINERS
  11. Makefile.am
  12. meson.build
  13. meson_options.txt
  14. README.md
README.md

stdplus

stdplus is a c++ project containing commonly used classes and functions for the Linux platform.

Dependencies

Test cases require google{test,mock}, valgrind, and lcov.

Building

For a standard release build, you want something like:

./bootstrap.sh
./configure --disable-examples --disable-tests
make
make install

For a test / debug build, a typical configuration is

./bootstrap.sh
./configure --enable-tests --enable-coverage --enable-valgrind
make
make check
make check-valgrind
make check-code-coverage