From 68832526efafb4db60e5627eba6a9051585a4eb9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Feb 2021 12:04:33 +0000 Subject: Factor a lot of maths and stuff into utility --- utility/sorting.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 utility/sorting.hpp (limited to 'utility/sorting.hpp') diff --git a/utility/sorting.hpp b/utility/sorting.hpp new file mode 100644 index 0000000..0cb0eaf --- /dev/null +++ b/utility/sorting.hpp @@ -0,0 +1,12 @@ +#ifndef SORTING_H +#define SORTING_H + +template struct PtrSorter { + bool + operator()(const T & a, const T & b) const + { + return *a < *b; + } +}; + +#endif -- cgit v1.2.3