/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/14 19:33:56 by adjoly #+# #+# */ /* Updated: 2025/04/14 19:39:02 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #include "easyfind.hpp" #include #include #include std::vector *newVec() { std::vector *vec = new std::vector; for (size_t i = 0; i < 10; i++) { vec->push_back(i); } return vec; } int main(void) { std::vector *vec = newVec(); try { std::vector::iterator it = easyfind >(*vec, 8); std::cout << "found value : " << *it << std::endl; } catch (std::runtime_error &e) { std::cerr << e.what() << std::endl; } try { std::vector::iterator it = easyfind >(*vec, 13); std::cout << "found value : " << *it << std::endl; } catch (std::runtime_error &e) { std::cerr << e.what() << std::endl; } }