aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-24 00:57:06 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-24 00:57:06 +0300
commite40169e87f2d705d0dfc7b4a29c622b0d3204d26 (patch)
tree7e9af1f94a730044012380569f398a6cd7224a6c /include
parentHandle: add static is_invalid() method (diff)
downloadwinapi-common-e40169e87f2d705d0dfc7b4a29c622b0d3204d26.tar.gz
winapi-common-e40169e87f2d705d0dfc7b4a29c622b0d3204d26.zip
Handle: add get()/ptr()
Diffstat (limited to '')
-rw-r--r--include/winapi/handle.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/winapi/handle.hpp b/include/winapi/handle.hpp
index 536de26..7c10735 100644
--- a/include/winapi/handle.hpp
+++ b/include/winapi/handle.hpp
@@ -28,7 +28,10 @@ public:
void swap(Handle& other) BOOST_NOEXCEPT_OR_NOTHROW;
- explicit operator HANDLE() const { return m_impl.get(); }
+ HANDLE get() const { return m_impl.get(); }
+ HANDLE ptr() const { return get(); }
+
+ explicit operator HANDLE() const { return ptr(); }
bool is_invalid() const;
static bool is_invalid(HANDLE);