Specialize PADDLE_ENFORCE and throw_on_error for pointer types
Created by: wangkuiyi
By adding the specialization of throw_on_error
for pointer types, we can write
PADDLE_ENFORCE(GlobalScope()->FindVar("variable_name"),
"variable_name not defined.");
without wrting the checking of nullptr
PADDLE_ENFORCE(GlobalScope()->FindVar("variable_name") != nullptr,
"variable_name not defined.");