From d63f5ce1cb86e69da28bd74b21e9452dbd88a38f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 28 Feb 2021 15:42:39 +0000 Subject: Move utility to lib --- lib/sorting.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/sorting.hpp (limited to 'lib/sorting.hpp') diff --git a/lib/sorting.hpp b/lib/sorting.hpp new file mode 100644 index 0000000..0cb0eaf --- /dev/null +++ b/lib/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