libstdc++
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 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
00064 {
00065 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00066 
00067   using std::_Rb_tree;
00068   using std::allocator;
00069 
00070   // Class rb_tree is not part of the C++ standard.  It is provided for
00071   // compatibility with the HP STL.
00072 
00073   /**
00074    *  This is an SGI extension.
00075    *  @ingroup SGIextensions
00076    *  @doctodo
00077    */
00078   template <class _Key, class _Value, class _KeyOfValue, class _Compare,
00079         class _Alloc = allocator<_Value> >
00080     struct rb_tree
00081     : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
00082     {
00083       typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
00084       typedef typename _Base::allocator_type allocator_type;
00085 
00086       rb_tree(const _Compare& __comp = _Compare(),
00087           const allocator_type& __a = allocator_type())
00088       : _Base(__comp, __a) { }
00089 
00090       ~rb_tree() { }
00091     };
00092 
00093 _GLIBCXX_END_NAMESPACE_VERSION
00094 } // namespace
00095 
00096 #endif