# rb_tree

Go to the documentation of this file.

    00001 // rb_tree extension -*- C++ -*-
    00002
    00003 // Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
    00004 //
    00005 // This file is part of the GNU ISO C++ Library.  This library is free
    00006 // software; you can redistribute it and/or modify it under the
    00007 // terms of the GNU General Public License as published by the
    00008 // Free Software Foundation; either version 3, or (at your option)
    00009 // any later version.
    00010
    00011 // This library is distributed in the hope that it will be useful,
    00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00014 // GNU General Public License for more details.
    00015
    00016 // Under Section 7 of GPL version 3, you are granted additional
    00017 // permissions described in the GCC Runtime Library Exception, version
    00018 // 3.1, as published by the Free Software Foundation.
    00019
    00020 // You should have received a copy of the GNU General Public License and
    00021 // a copy of the GCC Runtime Library Exception along with this program;
    00022 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    00023 // <http://www.gnu.org/licenses/>.
    00024
    00025 /*
    00026  *
    00027  * Copyright (c) 1994
    00028  * Hewlett-Packard Company
    00029  *
    00030  * Permission to use, copy, modify, distribute and sell this software
    00031  * and its documentation for any purpose is hereby granted without fee,
    00032  * provided that the above copyright notice appear in all copies and
    00033  * that both that copyright notice and this permission notice appear
    00034  * in supporting documentation.  Hewlett-Packard Company makes no
    00035  * representations about the suitability of this software for any
    00036  * purpose.  It is provided "as is" without express or implied warranty.
    00037  *
    00038  *
    00039  * Copyright (c) 1996
    00040  * Silicon Graphics Computer Systems, Inc.
    00041  *
    00042  * Permission to use, copy, modify, distribute and sell this software
    00043  * and its documentation for any purpose is hereby granted without fee,
    00044  * provided that the above copyright notice appear in all copies and
    00045  * that both that copyright notice and this permission notice appear
    00046  * in supporting documentation.  Silicon Graphics makes no
    00047  * representations about the suitability of this software for any
    00048  * purpose.  It is provided "as is" without express or implied warranty.
    00049  */
    00050
    00051 /** @file ext/rb_tree
    00052  *  This file is a GNU extension to the Standard C++ Library (possibly
    00053  *  containing extensions from the HP/SGI STL subset).
    00054  */
    00055
    00056 #ifndef _RB_TREE
    00057 #define _RB_TREE 1
    00058
    00059 #pragma GCC system_header
    00060
    00061 #include <bits/stl_tree.h>
    00062
    00063 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
    00064
    00065   using std::_Rb_tree;
    00066   using std::allocator;
    00067
    00068   // Class rb_tree is not part of the C++ standard.  It is provided for
    00069   // compatibility with the HP STL.
    00070
    00071   /**
    00072    *  This is an SGI extension.
    00073    *  @ingroup SGIextensions
    00074    *  @doctodo
    00075    */
    00076   template <class _Key, class _Value, class _KeyOfValue, class _Compare,
    00077         class _Alloc = allocator<_Value> >
    00078     struct rb_tree
    00079     : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
    00080     {
    00081       typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
    00082       typedef typename _Base::allocator_type allocator_type;
    00083
    00084       rb_tree(const _Compare& __comp = _Compare(),
    00085           const allocator_type& __a = allocator_type())
    00086       : _Base(__comp, __a) { }
    00087
    00088       ~rb_tree() { }
    00089     };
    00090
    00091 _GLIBCXX_END_NAMESPACE
    00092
    00093 #endif