File indexing completed on 2023-03-17 10:45:39
0001 #ifndef CommonTools_Utils_AndPairSelector_h
0002 #define CommonTools_Utils_AndPairSelector_h
0003
0004
0005
0006
0007
0008
0009
0010 template <typename S1, typename S2>
0011 struct AndPairSelector {
0012 AndPairSelector(const S1& s1, const S2& s2) : s1_(s1), s2_(s2) {}
0013 template <typename T1, typename T2>
0014 bool operator()(const T1& t1, const T2& t2) const {
0015 return s1_(t1) && s2_(t2);
0016 }
0017
0018 private:
0019 S1 s1_;
0020 S2 s2_;
0021 };
0022
0023 #endif