-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhatever.hpp
41 lines (34 loc) · 1.23 KB
/
whatever.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* whatever.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jmartin <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/08 15:24:12 by jmartin #+# #+# */
/* Updated: 2022/11/08 15:24:13 by jmartin ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef WHATEVER_HPP
# define WHATEVER_HPP
# include <iostream>
template <typename T> void swap(T &a, T &b)
{
T tmp;
tmp = a;
a = b;
b = tmp;
}
template <typename T> T const &min(T const &a, T const &b)
{
if (a < b)
return (a);
return (b);
}
template <typename T> T const &max(T const &a, T const &b)
{
if (a > b)
return (a);
return (b);
}
#endif