diff --git a/include/MacStd/common.hpp b/include/MacStd/common.hpp index a798b7f..21711c3 100644 --- a/include/MacStd/common.hpp +++ b/include/MacStd/common.hpp @@ -173,18 +173,17 @@ namespace macstd } /// - /// Tests if the object handle is invalid. + /// Tests if the object handle is valid. /// /// \return - /// - Non zero when object handle is invalid; + /// - Non zero when object handle is valid; /// - Zero otherwise. /// /// \note Implementing `operator bool() const` would be correct C++ approach here. Unfortunately, it would produce ambiguities where `bool` and `T` are polymorphed. - /// Use `!!` to test if the object handle is valid. /// - bool operator!() const + bool valid() const { - return m_h == INVAL; + return m_h != INVAL; } ///