mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibIPC: Make IPC::encode() and ::decode() fail at compiletime when used
This would previously fail at runtime, and it would have zero indication of what exactly went wrong. Also adds `AK::DependentFalse<Ts...>', which is a...dependent false.
This commit is contained in:
parent
fdb0ac7c1e
commit
b42c6ea281
Notes:
sideshowbarker
2024-07-19 02:03:20 +09:00
Author: https://github.com/alimpfard
Commit: b42c6ea281
Pull-request: https://github.com/SerenityOS/serenity/pull/3675
Reviewed-by: https://github.com/awesomekling
3 changed files with 7 additions and 1 deletions
|
@ -34,6 +34,7 @@ namespace IPC {
|
|||
template<typename T>
|
||||
bool encode(Encoder&, T&)
|
||||
{
|
||||
static_assert(DependentFalse<T>, "Base IPC::encode() was instantiated");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue