- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Executives/DeductiveController/Configs/TI_DSP_BIOS/stl/stl_pair.h

    00001 /*
    00002  *
    00003  * Copyright (c) 1994
    00004  * Hewlett-Packard Company
    00005  *
    00006  * Permission to use, copy, modify, distribute and sell this software
    00007  * and its documentation for any purpose is hereby granted without fee,
    00008  * provided that the above copyright notice appear in all copies and
    00009  * that both that copyright notice and this permission notice appear
    00010  * in supporting documentation.  Hewlett-Packard Company makes no
    00011  * representations about the suitability of this software for any
    00012  * purpose.  It is provided "as is" without express or implied warranty.
    00013  *
    00014  *
    00015  * Copyright (c) 1996,1997
    00016  * Silicon Graphics Computer Systems, Inc.
    00017  *
    00018  * Permission to use, copy, modify, distribute and sell this software
    00019  * and its documentation for any purpose is hereby granted without fee,
    00020  * provided that the above copyright notice appear in all copies and
    00021  * that both that copyright notice and this permission notice appear
    00022  * in supporting documentation.  Silicon Graphics makes no
    00023  * representations about the suitability of this software for any
    00024  * purpose.  It is provided "as is" without express or implied warranty.
    00025  */
    00026
    00027 /* NOTE: This is an internal header file, included by other STL headers.
    00028  *   You should not attempt to use it directly.
    00029  */
    00030
    00031 #ifndef __SGI_STL_INTERNAL_PAIR_H
    00032 #define __SGI_STL_INTERNAL_PAIR_H
    00033
    00034 __STL_BEGIN_NAMESPACE
    00035
    00036 template <class _T1, class _T2>
    00037 struct pair {
    00038   typedef _T1 first_type;
    00039   typedef _T2 second_type;
    00040
    00041   _T1 first;
    00042   _T2 second;
    00043   pair() : first(_T1()), second(_T2()) {}
    00044   pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
    00045
    00046 #ifdef __STL_MEMBER_TEMPLATES
    00047   template <class _U1, class _U2>
    00048   pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
    00049 #endif
    00050 };
    00051
    00052 template <class _T1, class _T2>
    00053 inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
    00054 {
    00055   return __x.first == __y.first && __x.second == __y.second;
    00056 }
    00057
    00058 template <class _T1, class _T2>
    00059 inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
    00060 {
    00061   return __x.first < __y.first ||
    00062          (!(__y.first < __x.first) && __x.second < __y.second);
    00063 }
    00064
    00065 template <class _T1, class _T2>
    00066 inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y)
    00067 {
    00068   return pair<_T1, _T2>(__x, __y);
    00069 }
    00070
    00071 __STL_END_NAMESPACE
    00072
    00073 #endif /* __SGI_STL_INTERNAL_PAIR_H */
    00074
    00075 // Local Variables:
    00076 // mode:C++
    00077 // End: