16#include <AUI/Traits/containers.h>
23template <
class KeyType,
class Comparator = std::less<KeyType>,
class Allocator = std::allocator<KeyType>>
24class ASet:
public std::set<KeyType, Comparator, Allocator>
27 using p = std::set<KeyType, Comparator, Allocator>;
33 using iterator =
typename p::iterator;
42 template<
typename OtherContainer>
44 p::insert(c.begin(), c.end());
50 template<
typename OtherContainer>
74 p::insert(std::move(rhs));
93 template<
typename OtherContainer, std::enable_if_t<!std::is_convertible_v<OtherContainer, KeyType>,
bool> = true>
94 inline self&
operator<<(
const OtherContainer& c)
noexcept
101 bool contains(
const KeyType& value)
const noexcept
103 return p::find(value) != p::end();
109inline std::ostream& operator<<(std::ostream& o,
const ASet<T>& v) {
116 for (; it != v.end(); ++it) {
A std::set with AUI extensions.
Definition: ASet.h:25
self & operator<<(const KeyType &rhs) noexcept
Definition: ASet.h:61
bool isSubsetOf(const OtherContainer &c) const noexcept
Definition: ASet.h:51
self & operator<<(const OtherContainer &c) noexcept
Definition: ASet.h:94
self & operator>>(const KeyType &rhs) noexcept
Definition: ASet.h:82
self & operator<<(KeyType &&rhs) noexcept
Definition: ASet.h:72
void insertAll(const OtherContainer &c) noexcept
Definition: ASet.h:43
bool is_subset(LContainer &l, RContainer &r) noexcept
Definition: containers.h:233