Skip to content

Commit 3479ad2

Browse files
committed
simpleified flat_set::contains as we only need comparisons to work
1 parent e637ac5 commit 3479ad2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

libmamba/include/mamba/util/flat_set.hpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ namespace mamba::util
112112
auto erase(const_iterator first, const_iterator last) -> const_iterator;
113113
auto erase(const value_type& value) -> size_type;
114114

115-
template <
116-
class T,
117-
// TODO: C++ >= 20 replace by concept
118-
class = std::enable_if_t<
119-
std::is_convertible_v<T, value_type> || std::is_convertible_v<value_type, T>>>
115+
template <class T>
120116
auto contains(const T& value) const -> bool;
121117

122118
private:
@@ -416,7 +412,7 @@ namespace mamba::util
416412
}
417413

418414
template <typename K, typename C, typename A>
419-
template <class T, class>
415+
template <class T>
420416
auto flat_set<K, C, A>::contains(const T& value) const -> bool
421417
{
422418
return std::binary_search(begin(), end(), value);

0 commit comments

Comments
 (0)