Skip to content
Snippets Groups Projects
Commit 8e52fff5 authored by Fabian Tërnava's avatar Fabian Tërnava
Browse files

added a contains method

parent 4d5696ca
No related branches found
No related tags found
No related merge requests found
#pragma once
#include <vector>
#include <algorithm>
namespace simox::alg
{
template <typename TypeT>
bool
contains(const std::vector<TypeT>& haystack, const TypeT& needle)
{
return std::find(haystack.begin(), haystack.end(), needle) != haystack.end();
}
template <typename TypeT>
std::vector<TypeT>
appended(const std::vector<TypeT>& v1, const std::vector<TypeT>& v2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment