WPILibC++  unspecified
llvm::SmallSet< T, N, C > Class Template Reference

SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less than N). More...

#include <SmallSet.h>

Public Types

typedef size_t size_type
 

Public Member Functions

bool LLVM_ATTRIBUTE_UNUSED_RESULT empty () const
 
size_type size () const
 
size_type count (const T &V) const
 count - Return 1 if the element is in the set, 0 otherwise.
 
std::pair< NoneType, bool > insert (const T &V)
 insert - Insert an element into the set if it isn't already there. More...
 
template<typename IterT >
void insert (IterT I, IterT E)
 
bool erase (const T &V)
 
void clear ()
 

Detailed Description

template<typename T, unsigned N, typename C = std::less<T>>
class llvm::SmallSet< T, N, C >

SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less than N).

In this case, the set can be maintained with no mallocs. If the set gets large, we expand to using an std::set to maintain reasonable lookup times.

Note that this set does not provide a way to iterate over members in the set.

Member Function Documentation

template<typename T, unsigned N, typename C = std::less<T>>
std::pair<NoneType, bool> llvm::SmallSet< T, N, C >::insert ( const T &  V)
inline

insert - Insert an element into the set if it isn't already there.

Returns true if the element is inserted (it was not in the set before). The first value of the returned pair is unused and provided for partial compatibility with the standard library self-associative container concept.


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