From: Daniel Dunbar Date: Sun, 9 Aug 2009 03:36:59 +0000 (+0000) Subject: STLExtras: Add less_ptr. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=094da67bd781708e76ab37c76e7a87d86404be05;p=oota-llvm.git STLExtras: Add less_ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78521 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 {