diff --git a/paddle/utils/Error.h b/paddle/utils/Error.h index 6fe7b6ea8884ecd255ec600aa3d30d517bae0a51..2b4fbef4e015e7c6895745f220bd444f3883c121 100644 --- a/paddle/utils/Error.h +++ b/paddle/utils/Error.h @@ -15,6 +15,7 @@ limitations under the License. */ #pragma once #include +#include #include #include #include @@ -113,7 +114,7 @@ public: /** * @brief operator bool, return True if there is no error. */ - operator bool() const { return !msg_; } + operator bool() const { return msg_ == nullptr; } /** * @brief check this status by glog.