From 539828dd2c4eb33f96227be3005fb02f5699bcd8 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 13 Oct 2022 12:36:09 +0200 Subject: [PATCH] Update documentation Signed-off-by: Simon Rozman --- include/WinStd/Common.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/WinStd/Common.h b/include/WinStd/Common.h index 74ff9305..f8b26272 100644 --- a/include/WinStd/Common.h +++ b/include/WinStd/Common.h @@ -684,12 +684,15 @@ namespace winstd } /// - /// Tests if the object handle is INVAL. + /// Tests if the object handle is invalid. /// /// \return - /// - Non zero when object handle is INVAL; + /// - Non zero when object handle is invalid; /// - Zero otherwise. /// + /// \note Implementing `operator bool() const` would be correct C++ approach here. Unfortunately, it would produce ambiguities where `bool` and `handle_type` are polymorphed. + /// Use `!!` to test if the object handle is valid. + /// bool operator!() const { return m_h == invalid;