From e9da63ad7997aff0a38048fdb65d846206171dc0 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 23 Mar 2023 13:28:57 +0200 Subject: [PATCH] BAN: Add is_const to traits --- BAN/include/BAN/Traits.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BAN/include/BAN/Traits.h b/BAN/include/BAN/Traits.h index d5ee04a951..de72338843 100644 --- a/BAN/include/BAN/Traits.h +++ b/BAN/include/BAN/Traits.h @@ -60,6 +60,11 @@ namespace BAN template inline constexpr bool is_pointer_v = is_pointer::value; template concept pointer = is_pointer_v; + template struct is_const : false_type {}; + template struct is_const : true_type {}; + template inline constexpr bool is_const_v = is_const::value; + + template struct less { constexpr bool operator()(const T& lhs, const T& rhs) const { return lhs < rhs; } }; template struct equal { constexpr bool operator()(const T& lhs, const T& rhs) const { return lhs == rhs; } }; template struct greater { constexpr bool operator()(const T& lhs, const T& rhs) const { return lhs > rhs; } };