feature: add NonCopyableOrMovable and NonCopyable concepts

Inheriting from NonCopyableOrMovableClass or NonCopyableClass
does not prevent derived classes from accidentally defining
their own copy or move constructors, violating the intended design.

This commit introduces two concepts:
- NonCopyableOrMovable
- NonCopyable

Using static asserts with these concepts will guarantee the intended
copy and move limitations.

Related-To: NEO-14068
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2025-02-12 12:40:51 +00:00
committed by Compute-Runtime-Automation
parent 904d90df90
commit 899abf3aac
6 changed files with 31 additions and 3 deletions

View File

@@ -272,4 +272,6 @@ class CommandContainer : public NonCopyableOrMovableClass {
bool globalBindlessHeapsEnabled = false;
};
static_assert(NEO::NonCopyableOrMovable<CommandContainer>);
} // namespace NEO