From 8250d355f5ee3ab88e52342424263f7eb7d9cc05 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Sun, 2 Apr 2017 01:47:56 +0500 Subject: [PATCH] Fix build on some environments. --- ministl/algo.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ministl/algo.h b/ministl/algo.h index dcd636a6..b7dd3784 100644 --- a/ministl/algo.h +++ b/ministl/algo.h @@ -77,6 +77,13 @@ void count_if(InputIterator first, InputIterator last, Predicate pred, while (first != last) if (pred(*first++)) ++n; } + +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif /* template inline _OI transform(_II _F, _II _L, _OI _X, _Uop _U)