I'm trying to check if a std::shared_ptr is null. Is there a difference between doing
std::shared_ptr
std::shared_ptr<int> p; if (!p) { // method 1 } if (p == nullptr) { // method 2 }
Aucun commentaire:
Enregistrer un commentaire