gcc/libstdc++-v3/include/bits/stl_map.h

740 lines
27 KiB
C
Raw Normal View History

algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
// Map implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
c_io_stdio.h: Correct grammar in comments. 2001-11-02 Phil Edwards <pme@gcc.gnu.org> * config/io/c_io_stdio.h: Correct grammar in comments. * docs/doxygen/Intro.3: Expand "top-level" man page. * docs/doxygen/doxygroups.cc: New module definitions (comments). * docs/doxygen/mainpage.doxy: Tweaks. * docs/doxygen/run_doxygen: Update Doxygen version, massage man pages. Add @file hooks so that headers are considered to be documented. * include/bits/basic_ios.h, include/bits/basic_file.h, include/bits/basic_string.h, include/bits/boost_concept_check.h, include/bits/char_traits.h, include/bits/codecvt.h, include/bits/concept_check.h, include/bits/cpp_type_traits.h, include/bits/fpos.h, include/bits/gslice.h, include/bits/gslice_array.h, include/bits/indirect_array.h, include/bits/ios_base.h, include/bits/locale_facets.h, include/bits/localefwd.h, include/bits/mask_array.h, include/bits/pthread_allocimpl.h, include/bits/slice.h, include/bits/slice_array.h, include/bits/std_algorithm.h, include/bits/std_bitset.h, include/bits/std_complex.h, include/bits/std_deque.h, include/bits/std_fstream.h, include/bits/std_functional.h, include/bits/std_iomanip.h, include/bits/std_ios.h, include/bits/std_iosfwd.h, include/bits/std_iostream.h, include/bits/std_istream.h, include/bits/std_iterator.h, include/bits/std_limits.h, include/bits/std_list.h, include/bits/std_locale.h, include/bits/std_map.h, include/bits/std_memory.h, include/bits/std_numeric.h, include/bits/std_ostream.h, include/bits/std_queue.h, include/bits/std_set.h, include/bits/std_sstream.h, include/bits/std_stack.h, include/bits/std_streambuf.h, include/bits/std_string.h, include/bits/std_utility.h, include/bits/std_valarray.h, include/bits/std_vector.h, include/bits/stl_algo.h, include/bits/stl_alloc.h, include/bits/stl_bvector.h, include/bits/stl_construct.h, include/bits/stl_deque.h, include/bits/stl_heap.h, include/bits/stl_iterator.h, include/bits/stl_iterator_base_funcs.h, include/bits/stl_iterator_base_types.h, include/bits/stl_list.h, include/bits/stl_map.h, include/bits/stl_multimap.h, include/bits/stl_multiset.h, include/bits/stl_numeric.h, include/bits/stl_pair.h, include/bits/stl_pthread_alloc.h, include/bits/stl_queue.h, include/bits/stl_raw_storage_iter.h, include/bits/stl_relops.h, include/bits/stl_set.h, include/bits/stl_stack.h, include/bits/stl_tempbuf.h, include/bits/stl_threads.h, include/bits/stl_tree.h, include/bits/stl_uninitialized.h, include/bits/stl_vector.h, include/bits/stream_iterator.h, include/bits/streambuf_iterator.h, include/bits/stringfwd.h, include/bits/type_traits.h, include/bits/valarray_array.h, include/bits/valarray_meta.h: Add hooks, tweak comments only. * include/bits/stl_algobase.h (swap, min, iter_swap): Also document these functions. * include/bits/stl_function.h: Tweak link comments. From-SVN: r46717
2001-11-02 18:38:11 +01:00
/** @file stl_map.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _MAP_H
#define _MAP_H 1
#include <bits/functexcept.h>
New concept checking implementation. 2001-04-02 Phil Edwards <pme@sources.redhat.com> New concept checking implementation. * docs/html/19_diagnostics/howto.html: Document. * docs/html/17_intro/concept_check.diff: New file, for reference. * include/bits/boost_concept_check.h: New file from Boost. * include/bits/c++config: Update comments. * include/bits/concept_check.h: New file. * include/bits/concept_checks.h: Removed. * include/bits/container_concepts.h: Removed. * include/bits/sequence_concepts.h: Removed. * include/bits/stl_iterator_base.h: Removed; split into... * include/bits/stl_iterator_base_funcs.h: ...this new file... * include/bits/stl_iterator_base_types.h: ...and this new file. * include/bits/sbuf_iter.h: Update to use new implementation. * include/bits/std_iterator.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hashtable.h: Likewise. * src/Makefile.am (base_headers): Update list of headers. * Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * libio/Makefile.in: Regenerated. * libmath/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * docs/html/install.html: Update contact information. * docs/html/17_intro/howto.html: Ditto. * docs/html/18_support/howto.html: Ditto. * docs/html/20_util/howto.html: Ditto. * docs/html/21_strings/howto.html: Ditto. * docs/html/22_locale/howto.html: Ditto. * docs/html/23_containers/howto.html: Ditto. * docs/html/24_iterators/howto.html: Ditto. * docs/html/25_algorithms/howto.html: Ditto. * docs/html/26_numerics/howto.html: Ditto. * docs/html/27_io/howto.html: Ditto. * docs/html/faq/index.html: Ditto, plus info on new checking code. * docs/html/ext/howto.html: Ditto, plus info on new checking code. * docs/html/faq/index.txt: Regenerated. From-SVN: r41031
2001-04-03 02:26:58 +02:00
#include <bits/concept_check.h>
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* @brief A standard container made up of (key,value) pairs, which can be
* retrieved based on a key, in logarithmic time.
*
* @ingroup Containers
* @ingroup Assoc_containers
*
* Meets the requirements of a <a href="tables.html#65">container</a>, a
* <a href="tables.html#66">reversible container</a>, and an
* <a href="tables.html#69">associative container</a> (using unique keys).
* For a @c map<Key,T> the key_type is Key, the mapped_type is T, and the
* value_type is std::pair<const Key,T>.
*
* Maps support bidirectional iterators.
*
* @if maint
* The private tree data is declared exactly the same way for map and
* multimap; the distinction is made entirely in how the tree functions are
* called (*_unique versus *_equal, same as the standard).
* @endif
*/
template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
class map
{
public:
typedef _Key key_type;
typedef _Tp mapped_type;
typedef std::pair<const _Key, _Tp> value_type;
typedef _Compare key_compare;
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
typedef _Alloc allocator_type;
private:
// concept requirements
typedef typename _Alloc::value_type _Alloc_value_type;
__glibcxx_class_requires(_Tp, _SGIAssignableConcept)
__glibcxx_class_requires4(_Compare, bool, _Key, _Key,
_BinaryFunctionConcept)
__glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
public:
class value_compare
: public std::binary_function<value_type, value_type, bool>
{
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
friend class map<_Key, _Tp, _Compare, _Alloc>;
protected:
_Compare comp;
value_compare(_Compare __c)
: comp(__c) { }
public:
bool operator()(const value_type& __x, const value_type& __y) const
{ return comp(__x.first, __y.first); }
};
private:
/// @if maint This turns a red-black tree into a [multi]map. @endif
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
typedef typename _Alloc::template rebind<value_type>::other
_Pair_alloc_type;
typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
key_compare, _Pair_alloc_type> _Rep_type;
/// @if maint The actual tree structure. @endif
_Rep_type _M_t;
public:
// many of these are specified differently in ISO, but the following are
// "functionally equivalent"
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
typedef typename _Pair_alloc_type::pointer pointer;
typedef typename _Pair_alloc_type::const_pointer const_pointer;
typedef typename _Pair_alloc_type::reference reference;
typedef typename _Pair_alloc_type::const_reference const_reference;
typedef typename _Rep_type::iterator iterator;
typedef typename _Rep_type::const_iterator const_iterator;
typedef typename _Rep_type::size_type size_type;
typedef typename _Rep_type::difference_type difference_type;
typedef typename _Rep_type::reverse_iterator reverse_iterator;
typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
// [23.3.1.1] construct/copy/destroy
// (get_allocator() is normally listed in this section, but seems to have
// been accidentally omitted in the printed standard)
/**
* @brief Default constructor creates no elements.
*/
map()
: _M_t(_Compare(), allocator_type()) { }
// for some reason this was made a separate function
/**
* @brief Default constructor creates no elements.
*/
explicit
map(const _Compare& __comp, const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) { }
/**
* @brief Map copy constructor.
* @param x A %map of identical element and allocator types.
*
* The newly-created %map uses a copy of the allocation object used
* by @a x.
*/
map(const map& __x)
: _M_t(__x._M_t) { }
/**
* @brief Builds a %map from a range.
* @param first An input iterator.
* @param last An input iterator.
*
* Create a %map consisting of copies of the elements from [first,last).
* This is linear in N if the range is already sorted, and NlogN
* otherwise (where N is distance(first,last)).
*/
template <typename _InputIterator>
map(_InputIterator __first, _InputIterator __last)
: _M_t(_Compare(), allocator_type())
{ _M_t._M_insert_unique(__first, __last); }
/**
* @brief Builds a %map from a range.
* @param first An input iterator.
* @param last An input iterator.
* @param comp A comparison functor.
* @param a An allocator object.
*
* Create a %map consisting of copies of the elements from [first,last).
* This is linear in N if the range is already sorted, and NlogN
* otherwise (where N is distance(first,last)).
*/
template <typename _InputIterator>
map(_InputIterator __first, _InputIterator __last,
const _Compare& __comp, const allocator_type& __a = allocator_type())
: _M_t(__comp, __a)
{ _M_t._M_insert_unique(__first, __last); }
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
// FIXME There is no dtor declared, but we should have something
// generated by Doxygen. I don't know what tags to add to this
// paragraph to make that happen:
/**
* The dtor only erases the elements, and note that if the elements
* themselves are pointers, the pointed-to memory is not touched in any
* way. Managing the pointer is the user's responsibilty.
*/
/**
* @brief Map assignment operator.
* @param x A %map of identical element and allocator types.
*
* All the elements of @a x are copied, but unlike the copy constructor,
* the allocator object is not copied.
*/
map&
operator=(const map& __x)
{
_M_t = __x._M_t;
return *this;
}
/// Get a copy of the memory allocation object.
allocator_type
get_allocator() const
{ return _M_t.get_allocator(); }
// iterators
/**
* Returns a read/write iterator that points to the first pair in the
* %map.
* Iteration is done in ascending order according to the keys.
*/
iterator
begin()
{ return _M_t.begin(); }
/**
* Returns a read-only (constant) iterator that points to the first pair
* in the %map. Iteration is done in ascending order according to the
* keys.
*/
const_iterator
begin() const
{ return _M_t.begin(); }
/**
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* Returns a read/write iterator that points one past the last
* pair in the %map. Iteration is done in ascending order
* according to the keys.
*/
iterator
end()
{ return _M_t.end(); }
/**
* Returns a read-only (constant) iterator that points one past the last
* pair in the %map. Iteration is done in ascending order according to
* the keys.
*/
const_iterator
end() const
{ return _M_t.end(); }
/**
* Returns a read/write reverse iterator that points to the last pair in
* the %map. Iteration is done in descending order according to the
* keys.
*/
reverse_iterator
rbegin()
{ return _M_t.rbegin(); }
/**
* Returns a read-only (constant) reverse iterator that points to the
* last pair in the %map. Iteration is done in descending order
* according to the keys.
*/
const_reverse_iterator
rbegin() const
{ return _M_t.rbegin(); }
/**
* Returns a read/write reverse iterator that points to one before the
* first pair in the %map. Iteration is done in descending order
* according to the keys.
*/
reverse_iterator
rend()
{ return _M_t.rend(); }
/**
* Returns a read-only (constant) reverse iterator that points to one
* before the first pair in the %map. Iteration is done in descending
* order according to the keys.
*/
const_reverse_iterator
rend() const
{ return _M_t.rend(); }
// capacity
/** Returns true if the %map is empty. (Thus begin() would equal
* end().)
*/
bool
empty() const
{ return _M_t.empty(); }
/** Returns the size of the %map. */
size_type
size() const
{ return _M_t.size(); }
/** Returns the maximum size of the %map. */
size_type
max_size() const
{ return _M_t.max_size(); }
// [23.3.1.2] element access
/**
* @brief Subscript ( @c [] ) access to %map data.
* @param k The key for which data should be retrieved.
* @return A reference to the data of the (key,data) %pair.
*
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* Allows for easy lookup with the subscript ( @c [] )
* operator. Returns data associated with the key specified in
* subscript. If the key does not exist, a pair with that key
* is created using default values, which is then returned.
*
* Lookup requires logarithmic time.
*/
mapped_type&
operator[](const key_type& __k)
{
// concept requirements
__glibcxx_function_requires(_DefaultConstructibleConcept<mapped_type>)
iterator __i = lower_bound(__k);
// __i->first is greater than or equivalent to __k.
if (__i == end() || key_comp()(__k, (*__i).first))
__i = insert(__i, value_type(__k, mapped_type()));
return (*__i).second;
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 464. Suggestion for new member functions in standard containers.
/**
* @brief Access to %map data.
* @param k The key for which data should be retrieved.
* @return A reference to the data whose key is equivalent to @a k, if
* such a data is present in the %map.
* @throw std::out_of_range If no such data is present.
*/
mapped_type&
at(const key_type& __k)
{
iterator __i = lower_bound(__k);
if (__i == end() || key_comp()(__k, (*__i).first))
__throw_out_of_range(__N("map::at"));
return (*__i).second;
}
const mapped_type&
at(const key_type& __k) const
{
const_iterator __i = lower_bound(__k);
if (__i == end() || key_comp()(__k, (*__i).first))
__throw_out_of_range(__N("map::at"));
return (*__i).second;
}
// modifiers
/**
* @brief Attempts to insert a std::pair into the %map.
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* @param x Pair to be inserted (see std::make_pair for easy creation
* of pairs).
* @return A pair, of which the first element is an iterator that
* points to the possibly inserted pair, and the second is
* a bool that is true if the pair was actually inserted.
*
* This function attempts to insert a (key, value) %pair into the %map.
* A %map relies on unique keys and thus a %pair is only inserted if its
* first element (the key) is not already present in the %map.
*
* Insertion requires logarithmic time.
*/
std::pair<iterator,bool>
insert(const value_type& __x)
{ return _M_t._M_insert_unique(__x); }
/**
* @brief Attempts to insert a std::pair into the %map.
* @param position An iterator that serves as a hint as to where the
* pair should be inserted.
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* @param x Pair to be inserted (see std::make_pair for easy creation
* of pairs).
* @return An iterator that points to the element with key of @a x (may
* or may not be the %pair passed in).
*
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* This function is not concerned about whether the insertion
* took place, and thus does not return a boolean like the
* single-argument insert() does. Note that the first
* parameter is only a hint and can potentially improve the
* performance of the insertion process. A bad hint would
* cause no gains in efficiency.
*
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* See
* http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
* for more on "hinting".
*
* Insertion requires logarithmic time (if the hint is not taken).
*/
iterator
insert(iterator position, const value_type& __x)
{ return _M_t._M_insert_unique(position, __x); }
/**
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* @brief Template function that attemps to insert a range of elements.
* @param first Iterator pointing to the start of the range to be
* inserted.
* @param last Iterator pointing to the end of the range.
*
* Complexity similar to that of the range constructor.
*/
template <typename _InputIterator>
void
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_unique(__first, __last); }
/**
* @brief Erases an element from a %map.
* @param position An iterator pointing to the element to be erased.
*
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* This function erases an element, pointed to by the given
* iterator, from a %map. Note that this function only erases
* the element, and that if the element is itself a pointer,
* the pointed-to memory is not touched in any way. Managing
* the pointer is the user's responsibilty.
*/
void
erase(iterator __position)
{ _M_t.erase(__position); }
/**
* @brief Erases elements according to the provided key.
* @param x Key of element to be erased.
* @return The number of elements erased.
*
* This function erases all the elements located by the given key from
* a %map.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
* in any way. Managing the pointer is the user's responsibilty.
*/
size_type
erase(const key_type& __x)
{ return _M_t.erase(__x); }
/**
* @brief Erases a [first,last) range of elements from a %map.
* @param first Iterator pointing to the start of the range to be
* erased.
* @param last Iterator pointing to the end of the range to be erased.
*
* This function erases a sequence of elements from a %map.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
* in any way. Managing the pointer is the user's responsibilty.
*/
void
erase(iterator __first, iterator __last)
{ _M_t.erase(__first, __last); }
/**
* @brief Swaps data with another %map.
* @param x A %map of the same element and allocator types.
*
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* This exchanges the elements between two maps in constant
* time. (It is only swapping a pointer, an integer, and an
* instance of the @c Compare type (which itself is often
* stateless and empty), so it should be quite fast.) Note
* that the global std::swap() function is specialized such
* that std::swap(m1,m2) will feed to this function.
*/
void
swap(map& __x)
{ _M_t.swap(__x._M_t); }
/**
c++config: Simplify debug namespaces. 2006-02-21 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Simplify debug namespaces. * include/ext/hash_set: Specialize insert_iterator after norm, debug containers have been (optionally) declared. Use nested namespaces. * include/ext/hash_map: Same. * include/debug/hash_map.h (insert): Add specialization for value pointer types. * include/debug/hash_set.h (insert): Same. * include/debug/hash_multimap.h: Change __gnu_debug_def to __debug. * include/debug/set.h: Same. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/multimap.h. Same. * include/debug/macros.h: Use __gnu_debug. * include/debug/debug.h: Same. * include/debug/formatter.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/safe_iterator.h: Same. * include/debug/safe_iterator.tcc: Same. (_M_invalidate): Adjust compare order. * include/debug/string: Change std::__gnu_debug to __gnu_debug. * include/ext/hashtable.h: Formatting fixes. * include/bits/stl_map.h: Formatting fixes. * src/compatibility.cc: Adjust compatibility symbols for old debug mode model. * src/debug_list.cc: Tweak. * src/debug.cc: Adjust namespaces. * docs/html/debug_mode.html: Adjust namespace names. * testsuite/25_algorithms/heap/heap.cc: Restore _GLIBCXX_DEBUG macro guards, as count values differ when in debug mode. * testsuite/23_containers/vector/26412.cc: Move to... * testsuite/23_containers/vector/26412-1.cc: ... here. * testsuite/23_containers/vector/26412-2.cc: Add. * include/ext/pb_assoc/detail/standard_policies.hpp (PB_ASSOC_HASH_NAMESPACE): Remove, use __gnu_cxx::hash_map and std::equal_to. * configure.ac (libtool_VERSION): To 6:8:0. * configure: Regenerate. * config/abi/pre/gnu.ver: Revert to exporting __gnu_debug symbols. (GLIBCXX_3.4.8): New. * testsuite/testsuite_abi.cc: Add GLIBCXX_3.4.8 to known versions. From-SVN: r111356
2006-02-22 01:57:24 +01:00
* Erases all elements in a %map. Note that this function only
* erases the elements, and that if the elements themselves are
* pointers, the pointed-to memory is not touched in any way.
* Managing the pointer is the user's responsibilty.
*/
void
clear()
{ _M_t.clear(); }
// observers
/**
* Returns the key comparison object out of which the %map was
* constructed.
*/
key_compare
key_comp() const
{ return _M_t.key_comp(); }
/**
* Returns a value comparison object, built from the key comparison
* object out of which the %map was constructed.
*/
value_compare
value_comp() const
{ return value_compare(_M_t.key_comp()); }
// [23.3.1.3] map operations
/**
* @brief Tries to locate an element in a %map.
* @param x Key of (key, value) %pair to be located.
* @return Iterator pointing to sought-after element, or end() if not
* found.
*
* This function takes a key and tries to locate the element with which
* the key matches. If successful the function returns an iterator
* pointing to the sought after %pair. If unsuccessful it returns the
* past-the-end ( @c end() ) iterator.
*/
iterator
find(const key_type& __x)
{ return _M_t.find(__x); }
/**
* @brief Tries to locate an element in a %map.
* @param x Key of (key, value) %pair to be located.
* @return Read-only (constant) iterator pointing to sought-after
* element, or end() if not found.
*
* This function takes a key and tries to locate the element with which
* the key matches. If successful the function returns a constant
* iterator pointing to the sought after %pair. If unsuccessful it
* returns the past-the-end ( @c end() ) iterator.
*/
const_iterator
find(const key_type& __x) const
{ return _M_t.find(__x); }
/**
* @brief Finds the number of elements with given key.
* @param x Key of (key, value) pairs to be located.
* @return Number of elements with specified key.
*
* This function only makes sense for multimaps; for map the result will
* either be 0 (not present) or 1 (present).
*/
size_type
count(const key_type& __x) const
{ return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
/**
* @brief Finds the beginning of a subsequence matching given key.
* @param x Key of (key, value) pair to be located.
* @return Iterator pointing to first element equal to or greater
* than key, or end().
*
* This function returns the first element of a subsequence of elements
* that matches the given key. If unsuccessful it returns an iterator
* pointing to the first element that has a greater value than given key
* or end() if no such element exists.
*/
iterator
lower_bound(const key_type& __x)
{ return _M_t.lower_bound(__x); }
/**
* @brief Finds the beginning of a subsequence matching given key.
* @param x Key of (key, value) pair to be located.
* @return Read-only (constant) iterator pointing to first element
* equal to or greater than key, or end().
*
* This function returns the first element of a subsequence of elements
* that matches the given key. If unsuccessful it returns an iterator
* pointing to the first element that has a greater value than given key
* or end() if no such element exists.
*/
const_iterator
lower_bound(const key_type& __x) const
{ return _M_t.lower_bound(__x); }
/**
* @brief Finds the end of a subsequence matching given key.
* @param x Key of (key, value) pair to be located.
* @return Iterator pointing to the first element
* greater than key, or end().
*/
iterator
upper_bound(const key_type& __x)
{ return _M_t.upper_bound(__x); }
/**
* @brief Finds the end of a subsequence matching given key.
* @param x Key of (key, value) pair to be located.
* @return Read-only (constant) iterator pointing to first iterator
* greater than key, or end().
*/
const_iterator
upper_bound(const key_type& __x) const
{ return _M_t.upper_bound(__x); }
/**
* @brief Finds a subsequence matching given key.
* @param x Key of (key, value) pairs to be located.
* @return Pair of iterators that possibly points to the subsequence
* matching given key.
*
* This function is equivalent to
* @code
* std::make_pair(c.lower_bound(val),
* c.upper_bound(val))
* @endcode
* (but is faster than making the calls separately).
*
* This function probably only makes sense for multimaps.
*/
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
std::pair<iterator, iterator>
equal_range(const key_type& __x)
{ return _M_t.equal_range(__x); }
/**
* @brief Finds a subsequence matching given key.
* @param x Key of (key, value) pairs to be located.
* @return Pair of read-only (constant) iterators that possibly points
* to the subsequence matching given key.
*
* This function is equivalent to
* @code
* std::make_pair(c.lower_bound(val),
* c.upper_bound(val))
* @endcode
* (but is faster than making the calls separately).
*
* This function probably only makes sense for multimaps.
*/
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
std::pair<const_iterator, const_iterator>
equal_range(const key_type& __x) const
{ return _M_t.equal_range(__x); }
template <typename _K1, typename _T1, typename _C1, typename _A1>
friend bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator== (const map<_K1, _T1, _C1, _A1>&,
const map<_K1, _T1, _C1, _A1>&);
template <typename _K1, typename _T1, typename _C1, typename _A1>
friend bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator< (const map<_K1, _T1, _C1, _A1>&,
const map<_K1, _T1, _C1, _A1>&);
};
/**
* @brief Map equality comparison.
* @param x A %map.
* @param y A %map of the same type as @a x.
* @return True iff the size and elements of the maps are equal.
*
* This is an equivalence relation. It is linear in the size of the
* maps. Maps are considered equivalent if their sizes are equal,
* and if corresponding elements compare equal.
*/
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return __x._M_t == __y._M_t; }
/**
* @brief Map ordering relation.
* @param x A %map.
* @param y A %map of the same type as @a x.
* @return True iff @a x is lexicographically less than @a y.
*
* This is a total ordering relation. It is linear in the size of the
* maps. The elements must be comparable with @c <.
*
* See std::lexicographical_compare() for how the determination is made.
*/
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return __x._M_t < __y._M_t; }
/// Based on operator==
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__x == __y); }
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return __y < __x; }
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__y < __x); }
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__x < __y); }
/// See std::map::swap().
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline void
re PR libstdc++/21770 (rebinding allocator::value type vs. container::value_type) 2005-06-03 Paolo Carlini <pcarlini@suse.de> PR libstdc++/21770 * include/bits/stl_deque.h: Add concept-check. In class _Deque_base rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_list.h: Add concept-check. In class _List_base rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which returns the allocator (of type _Node_alloc_type) converted to _Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/list.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_vector.h: Add concept-check. In class _Vector_base rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from the latter and add _M_get_Tp_allocator() which returns it. Use everywhere _M_get_Tp_allocator() instead of get_allocator(). * include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator(). * include/bits/stl_map.h: Add concept-check. Rebind _Alloc to _Pair_alloc_type and use it for _Rb_tree. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to _Key_alloc_type and use it for _Rb_tree. * include/bits/stl_set.h: Likewise. * include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and use it for the allocator typedefs. * testsuite/21_strings/basic_string/1.cc: New. * testsuite/23_containers/deque/explicit_instantiation.cc: Move to... * testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/deque/explicit_instantiation/3.cc: New. * testsuite/23_containers/list/explicit_instantiation.cc: Move to... * testsuite/23_containers/list/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/list/explicit_instantiation/3.cc: New. * testsuite/23_containers/map/explicit_instantiation.cc: Move to... * testsuite/23_containers/map/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/map/explicit_instantiation/3.cc: New. * testsuite/23_containers/multimap/explicit_instantiation.cc: Move to... * testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multimap/explicit_instantiation/3.cc: New. * testsuite/23_containers/multiset/explicit_instantiation.cc: Move to... * testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/multiset/explicit_instantiation/3.cc: New. * testsuite/23_containers/set/explicit_instantiation.cc: Move to... * testsuite/23_containers/set/explicit_instantiation/1.cc: .. here. * testsuite/23_containers/set/explicit_instantiation/3.cc: New. * testsuite/23_containers/vector/explicit_instantiation.cc: Move to... * testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here. * testsuite/23_containers/vector/explicit_instantiation/3.cc: New. From-SVN: r100546
2005-06-03 19:07:48 +02:00
swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
map<_Key, _Tp, _Compare, _Alloc>& __y)
{ __x.swap(__y); }
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _MAP_H */