mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 14:33:04 +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
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -73,4 +73,7 @@ struct ImageImp : public Image, NEO::NonCopyableOrMovableClass {
|
||||
bool sampledImage = false;
|
||||
bool mimickedImagefor3Ch = false;
|
||||
};
|
||||
|
||||
static_assert(NEO::NonCopyableOrMovable<ImageImp>);
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user