diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d5cffb..73c6a3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ current (development) - Feature: Support `ResizableSplit` with customizable separator. - Breaking: MenuDirection enum is renamed Direction - Fix: Remove useless new line when using an alternative screen. +- Breaking/Fix: Remove `ComponentBase` copy constructor/assignment. ### Dom - Feature: Add the dashed style for border and separator. diff --git a/include/ftxui/component/component_base.hpp b/include/ftxui/component/component_base.hpp index d63c7ed..25a2b87 100644 --- a/include/ftxui/component/component_base.hpp +++ b/include/ftxui/component/component_base.hpp @@ -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);