/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* easyfind.tpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/03 10:19:59 by rparodi #+# #+# */ /* Updated: 2025/04/03 11:18:50 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ template typename T::iterator easyfind(T &container, int value) { typename T::iterator it = std::find(container.begin(), container.end(), value); if (it == container.end()) throw std::runtime_error("Value not found"); return it; }