diff --git a/paddle/platform/enforce.h b/paddle/platform/enforce.h index 166d7032cd8613e59f98c8353737044e011253c5..bc0715656a7d61774d53d4a0643ec1c105706085 100644 --- a/paddle/platform/enforce.h +++ b/paddle/platform/enforce.h @@ -191,7 +191,7 @@ inline void throw_on_error(T e) { // if two values have different data types, choose a compatible type for them. template struct CompatibleType { - static constexpr const bool& t1_to_t2 = std::is_convertible::value; + static const bool t1_to_t2 = std::is_convertible::value; typedef typename std::conditional::type type; };