yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #6387 from lioncash/class-token

k_class_token: Use variable templates where applicable
This commit is contained in:
bunnei 2021-05-29 23:55:17 -07:00 committed by GitHub
commit a6cfc73cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 36 additions and 43 deletions

View File

@ -84,50 +84,43 @@ static_assert(ClassToken<KTransferMemory> == ((0b10010001 << 8) | ClassToken<KAu
// Ensure that the token hierarchy reflects the class hierarchy. // Ensure that the token hierarchy reflects the class hierarchy.
// Base classes. // Base classes.
static_assert(!std::is_final<KSynchronizationObject>::value && static_assert(!std::is_final_v<KSynchronizationObject> &&
std::is_base_of<KAutoObject, KSynchronizationObject>::value); std::is_base_of_v<KAutoObject, KSynchronizationObject>);
static_assert(!std::is_final<KReadableEvent>::value && static_assert(!std::is_final_v<KReadableEvent> &&
std::is_base_of<KSynchronizationObject, KReadableEvent>::value); std::is_base_of_v<KSynchronizationObject, KReadableEvent>);
// Final classes // Final classes
// static_assert(std::is_final<KInterruptEvent>::value && // static_assert(std::is_final_v<KInterruptEvent> &&
// std::is_base_of<KReadableEvent, KInterruptEvent>::value); // std::is_base_of_v<KReadableEvent, KInterruptEvent>);
// static_assert(std::is_final<KDebug>::value && // static_assert(std::is_final_v<KDebug> &&
// std::is_base_of<KSynchronizationObject, KDebug>::value); // std::is_base_of_v<KSynchronizationObject, KDebug>);
static_assert(std::is_final<KThread>::value && static_assert(std::is_final_v<KThread> && std::is_base_of_v<KSynchronizationObject, KThread>);
std::is_base_of<KSynchronizationObject, KThread>::value); static_assert(std::is_final_v<KServerPort> &&
static_assert(std::is_final<KServerPort>::value && std::is_base_of_v<KSynchronizationObject, KServerPort>);
std::is_base_of<KSynchronizationObject, KServerPort>::value); static_assert(std::is_final_v<KServerSession> &&
static_assert(std::is_final<KServerSession>::value && std::is_base_of_v<KSynchronizationObject, KServerSession>);
std::is_base_of<KSynchronizationObject, KServerSession>::value); static_assert(std::is_final_v<KClientPort> &&
static_assert(std::is_final<KClientPort>::value && std::is_base_of_v<KSynchronizationObject, KClientPort>);
std::is_base_of<KSynchronizationObject, KClientPort>::value); static_assert(std::is_final_v<KClientSession> && std::is_base_of_v<KAutoObject, KClientSession>);
static_assert(std::is_final<KClientSession>::value && static_assert(std::is_final_v<KProcess> && std::is_base_of_v<KSynchronizationObject, KProcess>);
std::is_base_of<KAutoObject, KClientSession>::value); static_assert(std::is_final_v<KResourceLimit> && std::is_base_of_v<KAutoObject, KResourceLimit>);
static_assert(std::is_final<KProcess>::value && // static_assert(std::is_final_v<KLightSession> &&
std::is_base_of<KSynchronizationObject, KProcess>::value); // std::is_base_of_v<KAutoObject, KLightSession>);
static_assert(std::is_final<KResourceLimit>::value && static_assert(std::is_final_v<KPort> && std::is_base_of_v<KAutoObject, KPort>);
std::is_base_of<KAutoObject, KResourceLimit>::value); static_assert(std::is_final_v<KSession> && std::is_base_of_v<KAutoObject, KSession>);
// static_assert(std::is_final<KLightSession>::value && static_assert(std::is_final_v<KSharedMemory> && std::is_base_of_v<KAutoObject, KSharedMemory>);
// std::is_base_of<KAutoObject, KLightSession>::value); static_assert(std::is_final_v<KEvent> && std::is_base_of_v<KAutoObject, KEvent>);
static_assert(std::is_final<KPort>::value && std::is_base_of<KAutoObject, KPort>::value); static_assert(std::is_final_v<KWritableEvent> && std::is_base_of_v<KAutoObject, KWritableEvent>);
static_assert(std::is_final<KSession>::value && std::is_base_of<KAutoObject, KSession>::value); // static_assert(std::is_final_v<KLightClientSession> &&
static_assert(std::is_final<KSharedMemory>::value && // std::is_base_of_v<KAutoObject, KLightClientSession>);
std::is_base_of<KAutoObject, KSharedMemory>::value); // static_assert(std::is_final_v<KLightServerSession> &&
static_assert(std::is_final<KEvent>::value && std::is_base_of<KAutoObject, KEvent>::value); // std::is_base_of_v<KAutoObject, KLightServerSession>);
static_assert(std::is_final<KWritableEvent>::value && static_assert(std::is_final_v<KTransferMemory> && std::is_base_of_v<KAutoObject, KTransferMemory>);
std::is_base_of<KAutoObject, KWritableEvent>::value); // static_assert(std::is_final_v<KDeviceAddressSpace> &&
// static_assert(std::is_final<KLightClientSession>::value && // std::is_base_of_v<KAutoObject, KDeviceAddressSpace>);
// std::is_base_of<KAutoObject, KLightClientSession>::value); // static_assert(std::is_final_v<KSessionRequest> &&
// static_assert(std::is_final<KLightServerSession>::value && // std::is_base_of_v<KAutoObject, KSessionRequest>);
// std::is_base_of<KAutoObject, KLightServerSession>::value); // static_assert(std::is_final_v<KCodeMemory> &&
static_assert(std::is_final<KTransferMemory>::value && // std::is_base_of_v<KAutoObject, KCodeMemory>);
std::is_base_of<KAutoObject, KTransferMemory>::value);
// static_assert(std::is_final<KDeviceAddressSpace>::value &&
// std::is_base_of<KAutoObject, KDeviceAddressSpace>::value);
// static_assert(std::is_final<KSessionRequest>::value &&
// std::is_base_of<KAutoObject, KSessionRequest>::value);
// static_assert(std::is_final<KCodeMemory>::value &&
// std::is_base_of<KAutoObject, KCodeMemory>::value);
} // namespace Kernel } // namespace Kernel