handle: Make it possible to reference stored data

Users of the handle often want to be able to reference data they plan to
use in their callbacks. This is especially useful for retrieving
references to dependency injected interfaces.

Change-Id: I2782794d7d8320e3a0dd7f47320e35d75303167a
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/stdplus/handle/managed.hpp b/src/stdplus/handle/managed.hpp
index 361c1ec..9b9bfb5 100644
--- a/src/stdplus/handle/managed.hpp
+++ b/src/stdplus/handle/managed.hpp
@@ -161,6 +161,19 @@
             reset(std::nullopt);
         }
 
+        /** @brief Reference the contained data
+         *
+         *  @return A reference to the contained data
+         */
+        constexpr const std::tuple<As...>& data() const noexcept
+        {
+            return as;
+        }
+        constexpr std::tuple<As...>& data() noexcept
+        {
+            return as;
+        }
+
       protected:
         /* Hold the data parameterized for this container */
         std::tuple<As...> as;