From 16379362c02a2472f00fac49cad62788547c9519 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 1 Jan 2025 17:41:17 -0600 Subject: Add CSV parsing, printing, fix buffered file reading. --- include/fud_algorithm.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/fud_algorithm.hpp') diff --git a/include/fud_algorithm.hpp b/include/fud_algorithm.hpp index 0ad71d5..01cc5d3 100644 --- a/include/fud_algorithm.hpp +++ b/include/fud_algorithm.hpp @@ -27,6 +27,20 @@ namespace fud { +template +concept LessThanComparable = + requires(T lhs, T rhs) { + { lhs < rhs } -> std::convertible_to; +}; + +template +inline const T& min(const T& lhs, const T& rhs) { + if (lhs < rhs) { + return lhs; + } + return rhs; +} + template class Iota { public: -- cgit v1.2.3