コード例 #1
0
ファイル: CopiedPtr.hpp プロジェクト: KLWebster/Thor
		/// @brief Checks if the smart pointer is not nullptr.
		/// @details Allows expressions of the form <i>if (ptr)</i> or <i>if (!ptr)</i>.
		/// @return Value convertible to true, if CopiedPtr is not empty; value convertible to false otherwise
		operator SafeBool() const
		{
			return toSafeBool(mPointer != nullptr);
		}
コード例 #2
0
ファイル: Optional.hpp プロジェクト: Bromeon/Aurora
		/// @brief Check if the optional object contains a value.
		///
		operator SafeBool() const
		{
			return toSafeBool(mFilled);
		}