From 6b09b73e1777337b6ef04e1c6dbd2c6d365fc51d Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Fri, 29 Nov 2019 10:13:31 +0800 Subject: [PATCH] add explicit conversion to NoNeedBufferVarsFunctor, test=develop (#21430) --- paddle/fluid/framework/no_need_buffer_vars_inference.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/no_need_buffer_vars_inference.h b/paddle/fluid/framework/no_need_buffer_vars_inference.h index 9124489ec6..c1640f6ccb 100644 --- a/paddle/fluid/framework/no_need_buffer_vars_inference.h +++ b/paddle/fluid/framework/no_need_buffer_vars_inference.h @@ -114,7 +114,7 @@ class InferNoNeedBufferVarsFN { return (*inferer_)(ctx); } - inline operator bool() const { return inferer_ != nullptr; } + inline explicit operator bool() const { return inferer_ != nullptr; } inline bool operator!() const { return inferer_ == nullptr; } -- GitLab