3 // Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the terms
7 // of the GNU General Public License as published by the Free Software
8 // Foundation; either version 3, or (at your option) any later
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
27 // Permission to use, copy, modify, sell, and distribute this software
28 // is hereby granted without fee, provided that the above copyright
29 // notice appears in all copies, and that both that copyright notice
30 // and this permission notice appear in supporting documentation. None
31 // of the above authors, nor IBM Haifa Research Laboratories, make any
32 // representation about the suitability of this software for any
33 // purpose. It is provided "as is" without express or implied
38 * Contains an implementation for bin_search_tree_.
41 #ifndef PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
42 #define PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
44 #include <ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp>
45 #include <ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp>
52 template<typename Key,
55 template<typename Const_Node_Iterator,
62 struct bin_search_tree_traits
77 bin_search_tree_const_it_<
78 typename Allocator::template rebind<
79 node>::other::pointer,
80 typename type_traits::value_type,
81 typename type_traits::pointer,
82 typename type_traits::const_pointer,
83 typename type_traits::reference,
84 typename type_traits::const_reference,
91 typename Allocator::template rebind<
92 node>::other::pointer,
93 typename type_traits::value_type,
94 typename type_traits::pointer,
95 typename type_traits::const_pointer,
96 typename type_traits::reference,
97 typename type_traits::const_reference,
103 bin_search_tree_const_it_<
104 typename Allocator::template rebind<
105 node>::other::pointer,
106 typename type_traits::value_type,
107 typename type_traits::pointer,
108 typename type_traits::const_pointer,
109 typename type_traits::reference,
110 typename type_traits::const_reference,
113 const_reverse_iterator;
117 typename Allocator::template rebind<
118 node>::other::pointer,
119 typename type_traits::value_type,
120 typename type_traits::pointer,
121 typename type_traits::const_pointer,
122 typename type_traits::reference,
123 typename type_traits::const_reference,
129 bin_search_tree_const_node_it_<
131 const_point_iterator,
137 bin_search_tree_node_it_<
139 const_point_iterator,
153 __gnu_pbds::null_tree_node_update<
158 null_node_update_pointer;
161 template<typename Key,
163 template<typename Const_Node_Iterator,
170 struct bin_search_tree_traits<
191 bin_search_tree_const_it_<
192 typename Allocator::template rebind<
193 node>::other::pointer,
194 typename type_traits::value_type,
195 typename type_traits::pointer,
196 typename type_traits::const_pointer,
197 typename type_traits::reference,
198 typename type_traits::const_reference,
201 const_point_iterator;
203 typedef const_point_iterator point_iterator;
206 bin_search_tree_const_it_<
207 typename Allocator::template rebind<
208 node>::other::pointer,
209 typename type_traits::value_type,
210 typename type_traits::pointer,
211 typename type_traits::const_pointer,
212 typename type_traits::reference,
213 typename type_traits::const_reference,
216 const_reverse_iterator;
218 typedef const_reverse_iterator reverse_iterator;
221 bin_search_tree_const_node_it_<
223 const_point_iterator,
228 typedef const_node_iterator node_iterator;
239 __gnu_pbds::null_tree_node_update<
244 null_node_update_pointer;
247 } // namespace detail
248 } // namespace __gnu_pbds
250 #endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP