summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-10-03 16:26:09 +0330
committerAndreas Kling <kling@serenityos.org>2020-10-04 23:12:28 +0200
commitb42c6ea281add0d5ad3bd2bec52742353c718603 (patch)
tree05472db15670738792d87eca01b5fcce7483f42f /AK
parentfdb0ac7c1e5bcdb7dfa6bbb8ab7fe164d4b12c75 (diff)
downloadserenity-b42c6ea281add0d5ad3bd2bec52742353c718603.zip
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.
Diffstat (limited to 'AK')
-rw-r--r--AK/StdLibExtras.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h
index c47066df4a..e8e02703ee 100644
--- a/AK/StdLibExtras.h
+++ b/AK/StdLibExtras.h
@@ -504,6 +504,9 @@ using CopyConst =
template<typename... Ts>
using Void = void;
+template<typename... _Ignored>
+inline constexpr auto DependentFalse = false;
+
}
using AK::AddConst;
@@ -512,6 +515,7 @@ using AK::ceil_div;
using AK::clamp;
using AK::Conditional;
using AK::declval;
+using AK::DependentFalse;
using AK::exchange;
using AK::forward;
using AK::is_trivial;