Sane C++ Libraries: SC::VectorSet< Value, Container (original) (raw)

A set built on an unsorted Vector, ensuring no item duplication. More...

#include <[VectorSet.h](VectorSet%5F8h%5Fsource.html)>

Public Member Functions
auto size () const
Return size of the set.
Value * begin ()
const Value * begin () const
Value * end ()
const Value * end () const
template
bool contains (const ComparableToValue &value) const
Check if the given Value exists in the VectorSet.
bool insert (const Value &value)
Inserts a value in the VectorSet (if it doesn't already exists)
template
bool remove (const ComparableToValue &value)
Removes a value from the VectorSet (if it exists)
Public Attributes
Container items

template<typename Value, typename Container = SC::Vector>
struct SC::VectorSet< Value, Container >

A set built on an unsorted Vector, ensuring no item duplication.

Template Parameters

Value The contained value
Container The underlying container used

for (auto& item : setOfStrings)

{

}

contains()

template<typename Value , typename Container = SC::Vector>

template

bool SC::VectorSet< Value, Container >::contains ( const ComparableToValue & value) const inlinenodiscard

Check if the given Value exists in the VectorSet.

insert()

template<typename Value , typename Container = SC::Vector>

bool SC::VectorSet< Value, Container >::insert ( const Value & value) inlinenodiscard

Inserts a value in the VectorSet (if it doesn't already exists)

remove()

template<typename Value , typename Container = SC::Vector>

template

bool SC::VectorSet< Value, Container >::remove ( const ComparableToValue & value) inlinenodiscard

Removes a value from the VectorSet (if it exists)

size()

template<typename Value , typename Container = SC::Vector>

Return size of the set.


The documentation for this struct was generated from the following file: