mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
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:
committed by
Compute-Runtime-Automation
parent
904d90df90
commit
899abf3aac
@@ -272,4 +272,6 @@ class CommandContainer : public NonCopyableOrMovableClass {
|
||||
bool globalBindlessHeapsEnabled = false;
|
||||
};
|
||||
|
||||
static_assert(NEO::NonCopyableOrMovable<CommandContainer>);
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user