提交 699dbe3b 编写于 作者: Y Yu Yang

Use `bool` for PADDLE_ENFORCE, not int

* If stat is an integer, bool value will implicit cast to int before
  pass to PADDLE_ENFORCE
上级 17827d7e
......@@ -107,7 +107,7 @@ struct EnforceNotMet : public std::exception {
template <typename... Args>
inline typename std::enable_if<sizeof...(Args) != 0, void>::type throw_on_error(
int stat, const Args&... args) {
bool stat, const Args&... args) {
if (UNLIKELY(!(stat))) {
throw std::runtime_error(string::Sprintf(args...));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册