MCPcopy Create free account
hub / github.com/Neargye/magic_enum / equal_range

Function equal_range

include/magic_enum/magic_enum_containers.hpp:121–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120template <typename Cmp = std::less<>, typename BidirIt, typename E>
121constexpr auto equal_range(BidirIt begin, BidirIt end, E&& e, Cmp&& comp = {}) {
122 const auto first = lower_bound(begin, end, e, comp);
123 return std::pair{first, lower_bound(std::make_reverse_iterator(end), std::make_reverse_iterator(first), e, [&comp](auto&& lhs, auto&& rhs) { return comp(rhs, lhs); }).base()};
124}
125
126template <typename E = void, typename Cmp = std::less<E>, typename = void>
127class indexing {

Callers 5

eraseMethod · 0.85
countMethod · 0.85
findMethod · 0.85
lower_boundMethod · 0.85
upper_boundMethod · 0.85

Calls 1

lower_boundFunction · 0.85

Tested by

no test coverage detected