File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -94,22 +94,7 @@ S1Ty set_difference(const S1Ty &S1, const S2Ty &S2) {
94
94
95
95
// / set_subtract(A, B) - Compute A := A - B
96
96
// /
97
- // / Selects the set to iterate based on the relative sizes of A and B for better
98
- // / efficiency.
99
- // /
100
97
template <class S1Ty , class S2Ty > void set_subtract (S1Ty &S1, const S2Ty &S2) {
101
- using ElemTy = decltype (*S1.begin ());
102
- // A couple callers pass a vector for S2, which doesn't support contains(),
103
- // and wouldn't be efficient if it did.
104
- if constexpr (detail::HasMemberContains<S2Ty, ElemTy>) {
105
- if (S1.size () < S2.size ()) {
106
- for (typename S1Ty::iterator SI = S1.begin (), SE = S1.end (); SI != SE;
107
- ++SI)
108
- if (S2.contains (*SI))
109
- S1.erase (SI);
110
- return ;
111
- }
112
- }
113
98
for (typename S2Ty::const_iterator SI = S2.begin (), SE = S2.end (); SI != SE;
114
99
++SI)
115
100
S1.erase (*SI);
You can’t perform that action at this time.
0 commit comments