mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
22 lines
534 B
C++
22 lines
534 B
C++
|
#pragma once
|
||
|
|
||
|
#include <algorithm>
|
||
|
|
||
|
namespace chatterino {
|
||
|
namespace util {
|
||
|
|
||
|
template <typename Container, typename UnaryPredicate>
|
||
|
typename Container::iterator find_if(Container &container, UnaryPredicate pred)
|
||
|
{
|
||
|
return std::find_if(container.begin(), container.end(), pred);
|
||
|
}
|
||
|
|
||
|
template <typename Container, typename UnaryPredicate>
|
||
|
bool any_of(Container &container, UnaryPredicate pred)
|
||
|
{
|
||
|
return std::any_of(container.begin(), container.end(), pred);
|
||
|
}
|
||
|
|
||
|
} // namespace util
|
||
|
} // namespace chatterino
|