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;
41 template<
typename OtherContainer>
43 p::insert(c.begin(), c.end());
49 template<
typename OtherContainer>
73 p::insert(std::move(rhs));
92 template<
typename OtherContainer, std::enable_if_t<!std::is_convertible_v<OtherContainer, KeyType>,
bool> = true>
93 inline self&
operator<<(
const OtherContainer& c)
noexcept
99 bool contains(
const KeyType& value)
const noexcept
101 return p::find(value) != p::end();
107inline std::ostream& operator<<(std::ostream& o,
const ASet<T>& v) {
114 for (; it != v.end(); ++it) {
A std::set with AUI extensions.
Definition ASet.h:25
self & operator<<(const KeyType &rhs) noexcept
Definition ASet.h:60
bool isSubsetOf(const OtherContainer &c) const noexcept
Definition ASet.h:50
self & operator<<(const OtherContainer &c) noexcept
Definition ASet.h:93
self & operator>>(const KeyType &rhs) noexcept
Definition ASet.h:81
self & operator<<(KeyType &&rhs) noexcept
Definition ASet.h:71
void insertAll(const OtherContainer &c) noexcept
Definition ASet.h:42
bool is_subset(LContainer &l, RContainer &r) noexcept
Definition containers.h:204