Delete copy constructor and copy operator (#638)

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Nick Fistere
2023-05-16 11:33:41 -05:00
committed by GitHub
parent 4d77353852
commit 9bfa241627
2 changed files with 7 additions and 0 deletions

View File

@@ -29,6 +29,12 @@ class ComponentBase {
// virtual Destructor.
virtual ~ComponentBase();
ComponentBase() = default;
// A component is not copiable.
ComponentBase(const ComponentBase&) = delete;
void operator=(const ComponentBase&) = delete;
// Component hierarchy:
ComponentBase* Parent() const;
Component& ChildAt(size_t i);