/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* pair.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: apommier +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/11/22 13:39:29 by apommier #+# #+# */ /* Updated: 2022/11/22 14:11:41 by apommier ### ########.fr */ /* */ /* ************************************************************************** */ #pragma once namespace ft { template struct pair{ typedef _T1 first_type; typedef _T2 second_type; _T1 _first; _T2 _second; pair(): _first(), _second() {} pair( const T1& x, const T2& y ); : _first(x), _second(y) {} template pair(const pair<_U1, _U2>& p): _first(p._first), _second(p._second) { } pair& operator=(pair& other) { _first = other.first; _second = other.second; return (*this); } }; template bool operator== (const pair& lhs, const pair& rhs) { return (lhs.first==rhs.first && lhs.second==rhs.second); } template bool operator!= (const pair& lhs, const pair& rhs) { return (!(lhs==rhs)); } template bool operator< (const pair& lhs, const pair& rhs) { return (lhs.first bool operator<= (const pair& lhs, const pair& rhs) { return (!(rhs bool operator> (const pair& lhs, const pair& rhs) { return (rhs bool operator>= (const pair& lhs, const pair& rhs) { return (!(lhs