There are some macros for preventing classes from being copied, eg: Macros to disallow class copy and assignment. Google -vs- Qt
Would I get identical results just by having a unique_ptr in my class? If so, is there a reason not to do this? eg
class Foo {
private:
std::unique_ptr<int> DISABLE_COPY;
};
Aucun commentaire:
Enregistrer un commentaire