diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-02 22:27:27 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-02 22:27:27 +0200 |
commit | 36e8ee0cdaa904ee00710b1d2df16691729cc93d (patch) | |
tree | 16e3836af7ef9efa6da1bbde4248ae5ad956bf58 /libk/type_traits.h | |
parent | libk: add its own makefile (diff) | |
download | kernel.cpp-36e8ee0cdaa904ee00710b1d2df16691729cc93d.tar.xz |
Print some multiboot2 information
Diffstat (limited to 'libk/type_traits.h')
-rw-r--r-- | libk/type_traits.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libk/type_traits.h b/libk/type_traits.h new file mode 100644 index 0000000..cef30c1 --- /dev/null +++ b/libk/type_traits.h @@ -0,0 +1,10 @@ +#pragma once + +template <class T, T v> struct integral_constant { + constexpr T operator()() const { return v; } + constexpr operator T() const { return v; } +}; + +template <class T, class U> struct is_same : integral_constant<bool, false> {}; + +template <class T> struct is_same<T, T> : integral_constant<bool, true> {}; |