summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-12 04:53:39 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-12 04:54:18 +0100
commit981a49bbc618c90ef868e9cd06c431fb8d6728fe (patch)
tree8aeba4c01f06bc4cdc07801c983d5fadd13b4a17
parenteff4b4a1da4358c9953bd8d31cedc9656a7c0f06 (diff)
chore: update WG01 DDK example.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--papers/wg01/wg01.pdfbin105601 -> 105380 bytes
-rw-r--r--source/wg01/wg01.tex15
2 files changed, 8 insertions, 7 deletions
diff --git a/papers/wg01/wg01.pdf b/papers/wg01/wg01.pdf
index b993ef4..7ac74d3 100644
--- a/papers/wg01/wg01.pdf
+++ b/papers/wg01/wg01.pdf
Binary files differ
diff --git a/source/wg01/wg01.tex b/source/wg01/wg01.tex
index 328accb..73c8e33 100644
--- a/source/wg01/wg01.tex
+++ b/source/wg01/wg01.tex
@@ -105,11 +105,11 @@ The following example shows how powerful C++ can be when combining it with Devic
/// @brief This concept requires the driver
/// to be IDriverBase compliant.
-constexpr auto kInvalidType = 0;
+inline constexpr auto kInvalidType = 0;
-template <typename T>
-concept IsValidDriver = requires(T a) {
- { a.IsActive() && a.Type() > kInvalidType };
+template <class Driver>
+concept IsValidDriver = requires(Driver drv) {
+ { drv.IsActive() && drv.Type() > kInvalidType };
};
/// @brief Consteval helper to detect
@@ -151,14 +151,15 @@ public:
};
int main() {
- B* callImpl = new B();
- callImpl->doImpl();
+ B callImpl;
+ callImpl.doImpl();
}
\end{lstlisting}
\section{Addressing V-Tables in a C++ Kernel.}
-Now the problem with kernel development is that we want to avoid such feature as much as possible, and we'd do that by following the Prong on Inheritance:
+Now the problem with kernel development is that we want to avoid such feature as much as possible, \\
+and we'd do that by following the Prong on Inheritance:
\subsection{The Three Prongs on Inheritance:}