Skip to content

Commit 58a749d

Browse files
committed
Simplify turning DynamicSortedSet into Slice
1 parent cd38d46 commit 58a749d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/array19.lib/array19/DynamicSortedSet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ template<class T, class Less = std::less<>> struct DynamicSortedSet {
2020
return b != e;
2121
}
2222

23+
operator SliceOf<T const>() const { return SliceOf{begin(), count()}; }
24+
2325
void add(T const& v) {
2426
auto [b, e] = std::equal_range(m.amendBegin(), m.amendEnd(), v, Less{});
2527
if (b == e) {

0 commit comments

Comments
 (0)