diff --git a/Kernel/include_std/functional b/Kernel/include_std/functional index faa80615..ed998a0d 100644 --- a/Kernel/include_std/functional +++ b/Kernel/include_std/functional @@ -260,6 +260,28 @@ namespace std } }; + template + struct less + { + constexpr bool operator()(const T *lhs, const T *rhs) const + { + if (__builtin_is_constant_evaluated()) + return lhs < rhs; + return (uintptr_t)lhs < (uintptr_t)rhs; + } + }; + + template <> + class less + { + public: + template + constexpr auto operator()(T &&lhs, U &&rhs) const -> decltype(std::forward(lhs) < std::forward(rhs)) + { + return std::forward(lhs) < std::forward(rhs); + } + }; + template constexpr typename std::result_of::type bind(F &&f, Args &&...args);