diff --git a/src/ds/bits.h b/src/ds/bits.h index 7e2f8bc..09dbf17 100644 --- a/src/ds/bits.h +++ b/src/ds/bits.h @@ -453,12 +453,24 @@ namespace snmalloc } } + /** + * Implementation of std::min + * + * std::min is algorithm, so pulls in a lot of unneccessary code + * We write our own to reduce the code that potentially needs reviewing. + **/ template constexpr inline T min(T t1, T t2) { return t1 < t2 ? t1 : t2; } + /** + * Implementation of std::max + * + * std::max is algorithm, so pulls in a lot of unneccessary code + * We write our own to reduce the code that potentially needs reviewing. + **/ template constexpr inline T max(T t1, T t2) {