You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.2KB

  1. // rb_tree extension -*- C++ -*-
  2. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // 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
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /*
  21. *
  22. * Copyright (c) 1994
  23. * Hewlett-Packard Company
  24. *
  25. * Permission to use, copy, modify, distribute and sell this software
  26. * and its documentation for any purpose is hereby granted without fee,
  27. * provided that the above copyright notice appear in all copies and
  28. * that both that copyright notice and this permission notice appear
  29. * in supporting documentation. Hewlett-Packard Company makes no
  30. * representations about the suitability of this software for any
  31. * purpose. It is provided "as is" without express or implied warranty.
  32. *
  33. *
  34. * Copyright (c) 1996
  35. * Silicon Graphics Computer Systems, Inc.
  36. *
  37. * Permission to use, copy, modify, distribute and sell this software
  38. * and its documentation for any purpose is hereby granted without fee,
  39. * provided that the above copyright notice appear in all copies and
  40. * that both that copyright notice and this permission notice appear
  41. * in supporting documentation. Silicon Graphics makes no
  42. * representations about the suitability of this software for any
  43. * purpose. It is provided "as is" without express or implied warranty.
  44. */
  45. /** @file ext/rb_tree
  46. * This file is a GNU extension to the Standard C++ Library (possibly
  47. * containing extensions from the HP/SGI STL subset).
  48. */
  49. #ifndef _RB_TREE
  50. #define _RB_TREE 1
  51. #pragma GCC system_header
  52. #include <bits/stl_tree.h>
  53. namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
  54. {
  55. _GLIBCXX_BEGIN_NAMESPACE_VERSION
  56. // Class rb_tree is not part of the C++ standard. It is provided for
  57. // compatibility with the HP STL.
  58. /**
  59. * This is an SGI extension.
  60. * @ingroup SGIextensions
  61. * @doctodo
  62. */
  63. template <class _Key, class _Value, class _KeyOfValue, class _Compare,
  64. class _Alloc = std::allocator<_Value> >
  65. struct rb_tree
  66. : public std::_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
  67. {
  68. typedef std::_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
  69. typedef typename _Base::allocator_type allocator_type;
  70. rb_tree(const _Compare& __comp = _Compare(),
  71. const allocator_type& __a = allocator_type())
  72. : _Base(__comp, __a) { }
  73. ~rb_tree() { }
  74. };
  75. _GLIBCXX_END_NAMESPACE_VERSION
  76. } // namespace
  77. #endif