clover/util: Allow using key_equals with pair-like objects other than std::pair.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 8 Oct 2014 22:02:19 +0000 (01:02 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 20 Oct 2014 07:33:02 +0000 (10:33 +0300)
src/gallium/state_trackers/clover/util/functional.hpp

index fb2877a..ed69155 100644 (file)
@@ -332,9 +332,9 @@ namespace clover {
       key_equals_t(T &&x) : x(x) {
       }
 
-      template<typename S>
+      template<typename P>
       bool
-      operator()(const std::pair<T, S> &p) const {
+      operator()(const P &p) const {
          return p.first == x;
       }