mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 06:25:30 -04:00
17 lines
358 B
C++
17 lines
358 B
C++
#ifndef OPENMC_CONTAINER_UTIL_H
|
|
#define OPENMC_CONTAINER_UTIL_H
|
|
|
|
#include <algorithm> // for find
|
|
#include <iterator> // for begin, end
|
|
|
|
namespace openmc {
|
|
|
|
template<class C, class T>
|
|
inline bool contains(const C& v, const T& x)
|
|
{
|
|
return std::end(v) != std::find(std::begin(v), std::end(v), x);
|
|
}
|
|
|
|
} // namespace openmc
|
|
|
|
#endif // OPENMC_CONTAINER_UTIL_H
|