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;