AK+Everywhere: Make StdLibExtras templates less wrapper-y

This commit makes the user-facing StdLibExtras templates and utilities
arguably more nice-looking by removing the need to reach into the
wrapper structs generated by them to get the value/type needed.
The C++ standard library had to invent `_v` and `_t` variants (likely
because of backwards compat), but we don't need to cater to any codebase
except our own, so might as well have good things for free. :^)
This commit is contained in:
AnotherTest 2021-04-10 18:29:06 +04:30 committed by Andreas Kling
commit a6e4482080
Notes: sideshowbarker 2024-07-18 20:34:39 +09:00
41 changed files with 650 additions and 662 deletions

View file

@ -36,10 +36,10 @@ namespace AK {
// Once it supports C++20 concepts, we can remove this.
#if defined(__cpp_concepts) && !defined(__COVERITY__)
template<typename T>
concept PointerTypeName = IsPointer<T>::value;
concept PointerTypeName = IsPointer<T>;
template<PointerTypeName T>
#else
template<typename T, typename EnableIf<IsPointer<T>::value, int>::Type = 0>
template<typename T, typename EnableIf<IsPointer<T>, int>::Type = 0>
#endif
class Userspace {