From 094da67bd781708e76ab37c76e7a87d86404be05 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 9 Aug 2009 03:36:59 +0000 Subject: [PATCH] STLExtras: Add less_ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78521 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/STLExtras.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index 964e7e07ef7..9ac73c0c96c 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -28,6 +28,13 @@ namespace llvm { // Extra additions to //===----------------------------------------------------------------------===// +template +struct less_ptr : public std::binary_function { + bool operator()(const Ty* left, const Ty* right) const { + return *left < *right; + } +}; + template struct greater_ptr : public std::binary_function { bool operator()(const Ty* left, const Ty* right) const {