aboutsummaryrefslogtreecommitdiff
path: root/cpp08/ex00/easyfind.hpp
blob: 68e176c67fab9cdfab89f33376017d9f3c7b98c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   easyfind.hpp                                       :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/15 05:53:04 by charles           #+#    #+#             */
/*   Updated: 2020/04/15 06:47:27 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#ifndef EASYFIND_HPP
# define EASYFIND_HPP

# include <algorithm>

template<typename T>
typename T::iterator easyfind(T& container, int x)
{
    return std::find(container.begin(), container.end(), x);
}

#endif