diff options
author | dgolear <[email protected]> | 2025-07-10 22:33:21 +0300 |
---|---|---|
committer | dgolear <[email protected]> | 2025-07-10 22:56:45 +0300 |
commit | 5f7c8cead6f7a3f7bea3f01cb168eb1f7a926879 (patch) | |
tree | 96517df0eaef6d7553ad127257902f0ff0707e4a /library/cpp/yt/compact_containers/compact_set.h | |
parent | 612146bc655489da23249308c666ca9eb2ef6509 (diff) |
YT: Allow serializing TCompactSet
commit_hash:733610a293a0c3a2656dbef77630d359c16d3bdf
Diffstat (limited to 'library/cpp/yt/compact_containers/compact_set.h')
-rw-r--r-- | library/cpp/yt/compact_containers/compact_set.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/library/cpp/yt/compact_containers/compact_set.h b/library/cpp/yt/compact_containers/compact_set.h index 354fad195cd..ce89bfb66ae 100644 --- a/library/cpp/yt/compact_containers/compact_set.h +++ b/library/cpp/yt/compact_containers/compact_set.h @@ -41,26 +41,33 @@ public: class const_iterator; using size_type = std::size_t; using key_type = T; + using value_type = T; TCompactSet() = default; TCompactSet(const A& allocator); + template <class TIterator> + TCompactSet(TIterator first, TIterator last); + TCompactSet(std::initializer_list<key_type> values); + + bool operator==(const TCompactSet& rhs) const; + [[nodiscard]] bool empty() const; size_type size() const; const T& front() const; - size_type count(const T& v) const; + size_type count(const T& value) const; - bool contains(const T& v) const; + bool contains(const T& value) const; - std::pair<const_iterator, bool> insert(const T& v); + std::pair<const_iterator, bool> insert(const T& value); template <typename TIter> - void insert(TIter i, TIter e); + void insert(TIter first, TIter last); - bool erase(const T& v); + bool erase(const T& value); void clear(); |