22 #ifndef INCLUDED_PS_STL
23 #define INCLUDED_PS_STL
38 template<
class Container,
class T>
41 if (
int count = container.size())
43 T* data = &container[0];
44 for (
int i = 0; i < count; ++i)
48 container.erase(container.begin() + i);
60 template<
class Container,
class T>
61 inline bool exists_in(
const Container& container,
const T& value)
63 if (
int count = container.size())
65 for (
const T* data = &container[0]; count; ++data, --count)
82 template<
class Container,
class T>
83 inline T*
find_in(
const Container& container,
const T& value)
85 if (
int count = container.size())
87 for (
const T* data = &container[0]; count; ++data, --count)
101 #endif // INCLUDED_PS_STL
#define T(string_literal)
bool exists_in(const Container &container, const T &value)
T * find_in(const Container &container, const T &value)
Finds a value in a container.
void remove_first_occurrence(Container &container, const T &value)
Removes the first occurrence of the specified value from the container.