#pragma once #include #include #include template Iterator Find(const T& value, Iterator first, Iterator last) { if (std::is_same_v) { auto f = std::lower_bound(first, last, value); if (f != last && !(value < *f)) { return f; } } else { while (first != last) { if (*first == value) { return first; } first++; } } return last; }