1
/* Copyright (C) 2004 Garrett A. Kajmowicz
2
This file is part of the uClibc++ Library.
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) any later version.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Lesser General Public License for more details.
14
You should have received a copy of the GNU Lesser General Public
15
License along with this library; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include <basic_definitions>
24
#ifndef __STD_HEADER_UTILITY
25
#define __STD_HEADER_UTILITY 1
27
#pragma GCC visibility push(default)
29
extern "C" void atexit();
34
template<class T> inline bool operator!=(const T& x, const T& y){
38
template<class T> inline bool operator> (const T& x, const T& y){
42
template<class T> inline bool operator<=(const T& x, const T& y){
46
template<class T> inline bool operator>=(const T& x, const T& y){
51
template <class T1, class T2> struct _UCXXEXPORT pair {
52
typedef T1 first_type;
53
typedef T2 second_type;
57
pair() : first(), second() { }
58
pair(const T1& x, const T2& y) : first(x), second(y) { }
59
template<class U, class V> pair(const pair<U, V> &p) : first(p.first), second(p.second) { }
62
template <class T1, class T2> bool operator==(const pair<T1,T2>& x, const pair<T1,T2>& y){
63
using namespace rel_ops;
64
return (x.first == y.first && x.second==y.second);
66
template <class T1, class T2> bool operator< (const pair<T1,T2>& x, const pair<T1,T2>& y){
67
return x.first < y.first || (!(y.first < x.first) && x.second < y.second);
69
template <class T1, class T2> bool operator!=(const pair<T1,T2>& x, const pair<T1,T2>& y){
72
template <class T1, class T2> bool operator> (const pair<T1,T2>& x, const pair<T1,T2>& y){
75
template <class T1, class T2> bool operator>=(const pair<T1,T2>& x, const pair<T1,T2>& y){
78
template <class T1, class T2> bool operator<=(const pair<T1,T2>& x, const pair<T1,T2>& y){
81
template <class T1, class T2> pair<T1,T2> make_pair(const T1& x, const T2& y){
82
return pair<T1,T2>(x, y);
88
#pragma GCC visibility pop
90
#endif //__STD_HEADER_UTILITY