33 #include <type_traits>
37 template <
typename T,
typename Compare = std::less<T>>
48 using BaseType::BaseType;
49 using BaseType::operator=;
53 #if __cplusplus < 202002L
56 return (BaseType::find(
value) != BaseType::cend());
62 return static_cast<int>(BaseType::size());
76 return BaseType::empty();
79 template <
typename std::enable_if_t<std::is_same_v<value_type, QString>,
int> = 0>
80 QString
join(
const QString &separator)
const
82 auto iter = BaseType::cbegin();
83 if (iter == BaseType::cend())
89 while (iter != BaseType::cend())
91 ret.push_back(separator + *iter);
100 return (BaseType::erase(
value) > 0);
105 BaseType::insert(other.cbegin(), other.cend());
typename BaseType::key_type key_type
std::set< T, Compare > BaseType
typename BaseType::value_type value_type
bool contains(const key_type &value) const
QString join(const QString &separator) const
ThisType & unite(const ThisType &other)
bool remove(const key_type &value)
ThisType & intersect(const ThisType &other)
void removeIf(T &dict, BinaryPredicate &&p)
T value(const QString &key, const T &defaultValue={})