1 #ifndef BITES_SORTEDLIST_HPP_INCLUDED
2 #define BITES_SORTEDLIST_HPP_INCLUDED
28 void add(
const T& item)
30 m_data.push_back(item);
39 auto lower = lower_bound(m_data.begin(), m_data.end(), item);
40 return distance(m_data.begin(), lower);
48 auto upper = lower_bound(m_data.begin(), m_data.end(), item);
49 return distance(++upper, m_data.end());
58 auto lower = lower_bound(m_data.begin(), m_data.end(), item);
59 unsigned int count = distance(m_data.begin(), lower);
60 m_data.erase(m_data.begin(), lower);
70 #endif // BITES_SORTEDLIST_HPP_INCLUDED
Definition: SortedList.hpp:12
unsigned int removeLT(const T &item)
Definition: SortedList.hpp:56
unsigned int getCountGT(const T &item) const
Definition: SortedList.hpp:46
SortedList(const std::list< T > &donor=std::list< T >())
Definition: SortedList.hpp:19
unsigned int getCountLT(const T &item) const
Definition: SortedList.hpp:37
void add(const T &item)
Definition: SortedList.hpp:28