13#ifndef ML_STD_ALGORITHMS_H
14#define ML_STD_ALGORITHMS_H
18#include <ThirdPartyWarningsDisable.h>
21#include <ThirdPartyWarningsRestore.h>
28 return std::find(vec.begin(), vec.end(), value) != vec.end();
34 auto it = std::find(vec.begin(), vec.end(), value);
35 if (
it != vec.end()) {
46 auto it = vec.begin();
47 while (
it != vec.end()) {
59 auto it = std::find(vec.begin(), vec.end(), value);
60 if (
it != vec.end()) {
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
bool vector_contains(const std::vector< T > &vec, const T &value)
Helper template that searches for value in given vector vec and returns true if it was found.
bool vector_replace_by_NULL(std::vector< T > &vec, const T &value)
Helper template that replaces the first occurrence of value in given vector vec with NULL and returns...
bool vector_remove(std::vector< T > &vec, const T &value)
Helper template that removes the first occurrence of value in given vector vec and returns true if it...
void vector_remove_all(std::vector< T > &vec, const T &value)
Helper template that removes all occurrences of value in given vector vec.