Created by: sneaxiy
Previously, PADDLE_ENFORCE_EQ
cannot support types that cannot convert to std::string
. This PR use C++ SFINAE feature to support all types.
- If the type can be converted to
std::string
, the error message is the same with previous one, such asx:3 != y:2
. - If the type cannot be converted to
std::string
, the error message isx != y
.