I've seen a constructor = delete explanation here but I'm wondering if I should forbid destructor calls as well. I'm trying to use a class like this:
class A
{
public:
static bool foo(const char* filePath);
static void foo(const int something);
private:
A() = delete;
~A();
};
Should I also write like ~A() = delete;
as well? Does it even matter?
Aucun commentaire:
Enregistrer un commentaire