From cb9fa588ba8144fcdd52ba4b83d69d93fb18066f Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 30 Mar 2025 23:08:43 -0500 Subject: Add hash map. --- include/fud_algorithm.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include/fud_algorithm.hpp') diff --git a/include/fud_algorithm.hpp b/include/fud_algorithm.hpp index 01cc5d3..82e98cb 100644 --- a/include/fud_algorithm.hpp +++ b/include/fud_algorithm.hpp @@ -23,7 +23,6 @@ #include #include -#include namespace fud { @@ -36,11 +35,23 @@ concept LessThanComparable = template inline const T& min(const T& lhs, const T& rhs) { if (lhs < rhs) { + // NOLINTNEXTLINE(bugprone-return-const-ref-from-parameter) return lhs; } + // NOLINTNEXTLINE(bugprone-return-const-ref-from-parameter) return rhs; } +template +inline const T& max(const T& lhs, const T& rhs) { + if (lhs < rhs) { + // NOLINTNEXTLINE(bugprone-return-const-ref-from-parameter) + return rhs; + } + // NOLINTNEXTLINE(bugprone-return-const-ref-from-parameter) + return lhs; +} + template class Iota { public: -- cgit v1.2.3