gcc/libstdc++-v3/testsuite/25_algorithms/heap/1.cc

141 lines
3.4 KiB
C++
Raw Normal View History

// Copyright (C) 2001-2019 Free Software Foundation, Inc.
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +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 3, or (at your option)
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// any later version.
// This library is distributed in the hope that it will be useful,
range_access.cc: Fix copying permission statement. * testsuite/18_support/initializer_list/range_access.cc: Fix copying permission statement. * testsuite/20_util/specialized_algorithms/uninitialized_copy/ 808590.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_copy/ move_iterators/1.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/ move_iterators/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc: Likewise. * testsuite/21_strings/basic_string/range_access/char/1.cc: Likewise. * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc: Likewise. * testsuite/23_containers/array/element_access/at_neg.cc: Likewise. * testsuite/23_containers/array/range_access.cc: Likewise. * testsuite/23_containers/deque/capacity/29134-2.cc: Likewise. * testsuite/23_containers/deque/capacity/29134.cc: Likewise. * testsuite/23_containers/deque/capacity/shrink_to_fit.cc: Likewise. * testsuite/23_containers/deque/range_access.cc: Likewise. * testsuite/23_containers/deque/requirements/do_the_right_thing.cc: Likewise. * testsuite/23_containers/forward_list/capacity/1.cc: Likewise. * testsuite/23_containers/forward_list/cons/1.cc: Likewise. * testsuite/23_containers/forward_list/cons/10.cc: Likewise. * testsuite/23_containers/forward_list/cons/11.cc: Likewise. * testsuite/23_containers/forward_list/cons/12.cc: Likewise. * testsuite/23_containers/forward_list/cons/2.cc: Likewise. * testsuite/23_containers/forward_list/cons/3.cc: Likewise. * testsuite/23_containers/forward_list/cons/4.cc: Likewise. * testsuite/23_containers/forward_list/cons/5.cc: Likewise. * testsuite/23_containers/forward_list/cons/6.cc: Likewise. * testsuite/23_containers/forward_list/cons/7.cc: Likewise. * testsuite/23_containers/forward_list/cons/8.cc: Likewise. * testsuite/23_containers/forward_list/cons/9.cc: Likewise. * testsuite/23_containers/forward_list/debug/clear.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after1_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after2_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after3_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after4_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after5_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after6_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after7_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after8_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/erase_after9_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/insert_after1_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/insert_after2_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/insert_after3_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/move_constructor.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after1_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after2_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after3_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after4_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after5_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after6_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/splice_after7_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/swap.cc: Likewise. * testsuite/23_containers/forward_list/modifiers/1.cc: Likewise. * testsuite/23_containers/forward_list/modifiers/2.cc: Likewise. * testsuite/23_containers/forward_list/modifiers/3.cc: Likewise. * testsuite/23_containers/forward_list/modifiers/4.cc: Likewise. * testsuite/23_containers/forward_list/modifiers/5.cc: Likewise. * testsuite/23_containers/forward_list/modifiers/6.cc: Likewise. * testsuite/23_containers/forward_list/operations/1.cc: Likewise. * testsuite/23_containers/forward_list/operations/2.cc: Likewise. * testsuite/23_containers/forward_list/operations/3.cc: Likewise. * testsuite/23_containers/forward_list/operations/4.cc: Likewise. * testsuite/23_containers/forward_list/operations/5.cc: Likewise. * testsuite/23_containers/forward_list/operations/6.cc: Likewise. * testsuite/23_containers/forward_list/operations/7.cc: Likewise. * testsuite/23_containers/forward_list/range_access.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ do_the_right_thing.cc: Likewise. * testsuite/23_containers/list/capacity/1.cc: Likewise. * testsuite/23_containers/list/capacity/1.h: Likewise. * testsuite/23_containers/list/capacity/29134.cc: Likewise. * testsuite/23_containers/list/modifiers/1.cc: Likewise. * testsuite/23_containers/list/modifiers/1.h: Likewise. * testsuite/23_containers/list/modifiers/1_c++0x.cc: Likewise. * testsuite/23_containers/list/modifiers/2.cc: Likewise. * testsuite/23_containers/list/modifiers/2.h: Likewise. * testsuite/23_containers/list/modifiers/3.cc: Likewise. * testsuite/23_containers/list/modifiers/3.h: Likewise. * testsuite/23_containers/list/modifiers/insert/25288.cc: Likewise. * testsuite/23_containers/list/modifiers/insert/25288.h: Likewise. * testsuite/23_containers/list/operations/1.cc: Likewise. * testsuite/23_containers/list/operations/1.h: Likewise. * testsuite/23_containers/list/operations/2.cc: Likewise. * testsuite/23_containers/list/operations/2.h: Likewise. * testsuite/23_containers/list/operations/2_c++0x.cc: Likewise. * testsuite/23_containers/list/operations/3.cc: Likewise. * testsuite/23_containers/list/operations/3.h: Likewise. * testsuite/23_containers/list/operations/3_c++0x.cc: Likewise. * testsuite/23_containers/list/operations/4.cc: Likewise. * testsuite/23_containers/list/operations/4.h: Likewise. * testsuite/23_containers/list/operations/42352.cc: Likewise. * testsuite/23_containers/list/operations/5.cc: Likewise. * testsuite/23_containers/list/operations/5.h: Likewise. * testsuite/23_containers/list/range_access.cc: Likewise. * testsuite/23_containers/list/requirements/do_the_right_thing.cc: Likewise. * testsuite/23_containers/map/capacity/29134.cc: Likewise. * testsuite/23_containers/map/range_access.cc: Likewise. * testsuite/23_containers/multimap/capacity/29134.cc: Likewise. * testsuite/23_containers/multimap/range_access.cc: Likewise. * testsuite/23_containers/multiset/capacity/29134.cc: Likewise. * testsuite/23_containers/multiset/range_access.cc: Likewise. * testsuite/23_containers/set/capacity/29134.cc: Likewise. * testsuite/23_containers/set/range_access.cc: Likewise. * testsuite/23_containers/unordered_map/final_hash.cc: Likewise. * testsuite/23_containers/unordered_map/observers.cc: Likewise. * testsuite/23_containers/unordered_map/range_access.cc: Likewise. * testsuite/23_containers/unordered_map/requirements/52942.cc: Likewise. * testsuite/23_containers/unordered_map/requirements/53067.cc: Likewise. * testsuite/23_containers/unordered_map/requirements/53339.cc: Likewise. * testsuite/23_containers/unordered_multimap/final_hash.cc: Likewise. * testsuite/23_containers/unordered_multimap/observers.cc: Likewise. * testsuite/23_containers/unordered_multimap/range_access.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/53339.cc: Likewise. * testsuite/23_containers/unordered_multiset/final_hash.cc: Likewise. * testsuite/23_containers/unordered_multiset/observers.cc: Likewise. * testsuite/23_containers/unordered_multiset/range_access.cc: Likewise. * testsuite/23_containers/unordered_set/final_hash.cc: Likewise. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Likewise. * testsuite/23_containers/unordered_set/observers.cc: Likewise. * testsuite/23_containers/unordered_set/range_access.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/52942.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/53067.cc: Likewise. * testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Likewise. * testsuite/23_containers/vector/capacity/29134-2.cc: Likewise. * testsuite/23_containers/vector/capacity/29134.cc: Likewise. * testsuite/23_containers/vector/capacity/shrink_to_fit.cc: Likewise. * testsuite/23_containers/vector/capacity/shrink_to_fit2.cc: Likewise. * testsuite/23_containers/vector/range_access.cc: Likewise. * testsuite/23_containers/vector/requirements/do_the_right_thing.cc: Likewise. * testsuite/24_iterators/range_access.cc: Likewise. * testsuite/25_algorithms/copy/1.cc: Likewise. * testsuite/25_algorithms/copy/2.cc: Likewise. * testsuite/25_algorithms/copy/3.cc: Likewise. * testsuite/25_algorithms/copy/34595.cc: Likewise. * testsuite/25_algorithms/copy/4.cc: Likewise. * testsuite/25_algorithms/copy/deque_iterators/1.cc: Likewise. * testsuite/25_algorithms/copy/move_iterators/1.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/char/1.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/char/2.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/char/3.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/1.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/2.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/3.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc: Likewise. * testsuite/25_algorithms/copy_backward/deque_iterators/1.cc: Likewise. * testsuite/25_algorithms/copy_backward/move_iterators/1.cc: Likewise. * testsuite/25_algorithms/copy_n/1.cc: Likewise. * testsuite/25_algorithms/copy_n/2.cc: Likewise. * testsuite/25_algorithms/copy_n/3.cc: Likewise. * testsuite/25_algorithms/copy_n/4.cc: Likewise. * testsuite/25_algorithms/copy_n/50119.cc: Likewise. * testsuite/25_algorithms/copy_n/move_iterators/1.cc: Likewise. * testsuite/25_algorithms/fill/4.cc: Likewise. * testsuite/25_algorithms/fill_n/1.cc: Likewise. * testsuite/25_algorithms/find/istreambuf_iterators/char/1.cc: Likewise. * testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc: Likewise. * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/1.cc: Likewise. * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc: Likewise. * testsuite/25_algorithms/heap/1.cc: Likewise. * testsuite/25_algorithms/heap/moveable.cc: Likewise. * testsuite/25_algorithms/heap/moveable2.cc: Likewise. * testsuite/25_algorithms/is_heap/1.cc: Likewise. * testsuite/25_algorithms/is_heap_until/1.cc: Likewise. * testsuite/25_algorithms/is_sorted/1.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/1.cc: Likewise. * testsuite/25_algorithms/move/1.cc: Likewise. * testsuite/25_algorithms/move/deque_iterators/1.cc: Likewise. * testsuite/25_algorithms/move_backward/1.cc: Likewise. * testsuite/25_algorithms/move_backward/deque_iterators/1.cc: Likewise. * testsuite/25_algorithms/partition/1.cc: Likewise. * testsuite/25_algorithms/partition/moveable.cc: Likewise. * testsuite/25_algorithms/pop_heap/empty2_neg.cc: Likewise. * testsuite/25_algorithms/pop_heap/empty_neg.cc: Likewise. * testsuite/25_algorithms/stable_partition/1.cc: Likewise. * testsuite/25_algorithms/stable_partition/moveable.cc: Likewise. * testsuite/25_algorithms/stable_partition/pr52822.cc: Likewise. * testsuite/26_numerics/valarray/range_access.cc: Likewise. * testsuite/28_regex/range_access.cc: Likewise. * testsuite/ext/vstring/capacity/29134.cc: Likewise. * testsuite/ext/vstring/capacity/shrink_to_fit.cc: Likewise. * testsuite/ext/vstring/hash/char/1.cc: Likewise. * testsuite/ext/vstring/hash/wchar_t/1.cc: Likewise. * testsuite/ext/vstring/range_access.cc: Likewise. * testsuite/ext/vstring/requirements/do_the_right_thing.cc: Likewise. * testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc: Likewise. * testsuite/performance/25_algorithms/copy_deque_iterators.cc: Likewise. * testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Likewise. * testsuite/tr1/6_containers/unordered_multimap/capacity/ 29134-multimap.cc: Likewise. * testsuite/tr1/6_containers/unordered_multiset/capacity/ 29134-multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc: Likewise. From-SVN: r193076
2012-11-02 00:20:37 +01:00
// but WITHOUT ANY WARRANTY; without even the implied warranty of
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// 25.3.6 Heap operations [lib.alg.heap.operations]
#include <algorithm>
acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): New macro, calls... 2001-08-06 Phil Edwards <pme@sources.redhat.com> * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): New macro, calls... (GLIBCPP_CHECK_SETRLIMIT): ...this new macro, which also uses... (GLIBCPP_CHECK_SETRLIMIT_ancilliary): ...this new macro. * configure.in (AM_CONFIG_HEADER): Also generate testsuite_hooks.h. Call GLIBCPP_CONFIGURE_TESTSUITE. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/lib/libstdc++-v3-dg.exp: Download new header instead of old header. * testsuite_flags.in: Add build dir's testsuite to INCLUDES. * testsuite/debug_assert.h: Removed; contents merged into... * testsuite/testsuite_hooks.h.in: ...here. New file. * testsuite/17_intro/header_ciso646.cc: No longer include debug_assert.h, include testsuite_hooks.h instead. * testsuite/17_intro/header_fstream.cc: Likewise. * testsuite/17_intro/header_iomanip.cc: Likewise. * testsuite/17_intro/header_ios.cc: Likewise. * testsuite/17_intro/header_iosfwd.cc: Likewise. * testsuite/17_intro/header_iostream.cc: Likewise. * testsuite/17_intro/header_istream.cc: Likewise. * testsuite/17_intro/header_ostream.cc: Likewise. * testsuite/17_intro/header_sstream.cc: Likewise. * testsuite/17_intro/header_streambuf.cc: Likewise. * testsuite/18_support/numeric_limits.cc: Likewise. * testsuite/19_diagnostics/stdexceptions.cc: Likewise. * testsuite/20_util/allocator_members.cc: Likewise. * testsuite/20_util/auto_ptr.cc: Likewise. * testsuite/20_util/pairs.cc: Likewise. * testsuite/21_strings/append.cc: Likewise. * testsuite/21_strings/capacity.cc: Likewise. * testsuite/21_strings/char_traits_requirements.cc: Likewise. * testsuite/21_strings/compare.cc: Likewise. * testsuite/21_strings/ctor_copy_dtor.cc: Likewise. Also set up call to (disabled) __set_testsuite_memlimit() wrapper. * testsuite/21_strings/element_access.cc: Likewise. * testsuite/21_strings/find.cc: Likewise. * testsuite/21_strings/insert.cc: Likewise. Also set up call to (disabled) __set_testsuite_memlimit() wrapper. * testsuite/21_strings/inserters_extractors.cc: Likewise. * testsuite/21_strings/invariants.cc: Likewise. * testsuite/21_strings/nonmember.cc: Likewise. * testsuite/21_strings/operations.cc: Likewise. * testsuite/21_strings/replace.cc: Likewise. * testsuite/21_strings/rfind.cc: Likewise. * testsuite/21_strings/substr.cc: Likewise. * testsuite/22_locale/codecvt_char_char.cc: Likewise. * testsuite/22_locale/codecvt_unicode_char.cc: Likewise. * testsuite/22_locale/codecvt_unicode_wchar_t.cc: Likewise. * testsuite/22_locale/codecvt_wchar_t_char.cc: Likewise. * testsuite/22_locale/ctor_copy_dtor.cc: Likewise. * testsuite/22_locale/ctype_char_members.cc: Likewise. * testsuite/22_locale/ctype_wchar_t_members.cc: Likewise. * testsuite/22_locale/facet.cc: Likewise. * testsuite/22_locale/global_templates.cc: Likewise. * testsuite/22_locale/members.cc: Likewise. * testsuite/22_locale/numpunct_byname.cc: Likewise. * testsuite/22_locale/numpunct_char_members.cc: Likewise. * testsuite/22_locale/operators.cc: Likewise. * testsuite/22_locale/static_members.cc: Likewise. * testsuite/23_containers/bitset_ctor.cc: Likewise. * testsuite/23_containers/bitset_members.cc: Likewise. * testsuite/23_containers/bitset_shift.cc: Likewise. * testsuite/23_containers/vector_capacity.cc: Likewise. * testsuite/23_containers/vector_ctor.cc: Likewise. * testsuite/23_containers/vector_element_access.cc: Likewise. * testsuite/23_containers/vector_modifiers.cc: Likewise. * testsuite/24_iterators/istreambuf_iterator.cc: Likewise. * testsuite/24_iterators/iterator.cc: Likewise. * testsuite/24_iterators/ostreambuf_iterator.cc: Likewise. * testsuite/25_algorithms/binary_search.cc: Likewise. * testsuite/25_algorithms/copy.cc: Likewise. * testsuite/25_algorithms/heap.cc: Likewise. * testsuite/25_algorithms/lower_bound.cc: Likewise. * testsuite/25_algorithms/min_max.cc: Likewise. * testsuite/25_algorithms/partition.cc: Likewise. * testsuite/25_algorithms/rotate.cc: Likewise. * testsuite/25_algorithms/sort.cc: Likewise. * testsuite/26_numerics/c_math.cc: Likewise. * testsuite/26_numerics/complex_inserters_extractors.cc: Likewise. * testsuite/26_numerics/complex_value.cc: Likewise. * testsuite/27_io/filebuf.cc: Likewise. * testsuite/27_io/filebuf_members.cc: Likewise. * testsuite/27_io/filebuf_virtuals.cc: Likewise. * testsuite/27_io/fpos.cc: Likewise. * testsuite/27_io/fstream_members.cc: Likewise. * testsuite/27_io/ifstream_members.cc: Likewise. * testsuite/27_io/ios_base_callbacks.cc: Likewise. * testsuite/27_io/ios_base_members_static.cc: Likewise. * testsuite/27_io/ios_base_storage.cc: Likewise. * testsuite/27_io/ios_ctor.cc: Likewise. * testsuite/27_io/ios_init.cc: Likewise. * testsuite/27_io/ios_manip_basefield.cc: Likewise. * testsuite/27_io/ios_manip_fmtflags.cc: Likewise. * testsuite/27_io/ios_members.cc: Likewise. * testsuite/27_io/istream_extractor_arith.cc: Likewise. * testsuite/27_io/istream_extractor_char.cc: Likewise. * testsuite/27_io/istream_extractor_other.cc: Likewise. * testsuite/27_io/istream_manip.cc: Likewise. * testsuite/27_io/istream_seeks.cc: Likewise. * testsuite/27_io/istream_sentry.cc: Likewise. * testsuite/27_io/istream_unformatted.cc: Likewise. * testsuite/27_io/istringstream_members.cc: Likewise. * testsuite/27_io/narrow_stream_objects.cc: Likewise. * testsuite/27_io/ofstream_members.cc: Likewise. * testsuite/27_io/ostream_inserter_arith.cc: Likewise. * testsuite/27_io/ostream_inserter_char.cc: Likewise. * testsuite/27_io/ostream_inserter_other.cc: Likewise. * testsuite/27_io/ostream_manip.cc: Likewise. * testsuite/27_io/ostream_seeks.cc: Likewise. * testsuite/27_io/ostream_unformatted.cc: Likewise. * testsuite/27_io/ostringstream_members.cc: Likewise. * testsuite/27_io/streambuf.cc: Likewise. * testsuite/27_io/stringbuf.cc: Likewise. * testsuite/27_io/stringbuf_virtuals.cc: Likewise. * testsuite/27_io/stringstream.cc: Likewise. * testsuite/27_io/stringstream_members.cc: Likewise. * testsuite/27_io/wide_stream_objects.cc: Likewise. From-SVN: r44679
2001-08-07 05:38:33 +02:00
#include <testsuite_hooks.h>
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
const int A[] = {1, 11, 12, 3, 10, 6, 17, 4, 8, 2, 5, 13, 9, 15, 14, 16, 7};
const int B[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
const int C[] = {17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
const int N = sizeof(A) / sizeof(int);
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
// This functor has the equivalent functionality of std::greater<>,
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// but there is no dependency on <functional> and it also tracks the
// number of invocations since creation.
class Gt
{
public:
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
static int count() { return _M_count; }
static void reset() { _M_count = 0; }
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
bool
operator()(const int& x, const int& y)
{
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
++_M_count;
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
return x > y;
}
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
private:
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
static int _M_count;
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
};
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
int Gt::_M_count = 0;
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
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
// Exercise all of the heap functions for operator<. The intermediate
// results between push_heap and pop_heap and make_heap and sort_heap
// are not checked (they could be).
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
void
test01()
{
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
// sort array s1 using push_heap/pop_heap
int s1[N];
std::copy(A, A + N, s1);
VERIFY(std::equal(s1, s1 + N, A));
for (int i = 2; i <= N; ++i)
std::push_heap(s1, s1 + i);
for (int i = N; i >= 2; --i)
std::pop_heap(s1, s1 + i);
VERIFY(std::equal(s1, s1 + N, B));
// sort array s2 using make_heap/sort_heap
int s2[N];
std::copy(A, A + N, s2);
VERIFY(std::equal(s2, s2 + N, A));
std::make_heap(s2, s2 + N);
std::sort_heap(s2, s2 + N);
VERIFY(std::equal(s2, s2 + N, B));
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
// Perform same tests as above but with the comparison predicate
// versions, and add complexity constraint checks.
void
test02()
{
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
Gt gt;
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
#ifndef _GLIBCXX_DEBUG
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
//const int logN = static_cast<int>(std::log(static_cast<double>(N)) + 0.5);
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
const int logN = 3;
#endif
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
int s1[N];
std::copy(A, A + N, s1);
VERIFY(std::equal(s1, s1 + N, A));
for (int i = 2; i <= N; ++i)
{
std::push_heap(s1, s1 + i, gt);
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
#ifndef _GLIBCXX_DEBUG
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
VERIFY(gt.count() <= logN);
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
#endif
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
gt.reset();
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
for (int i = N; i >= 2; --i)
{
std::pop_heap(s1, s1 + i, gt);
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
#ifndef _GLIBCXX_DEBUG
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
VERIFY(gt.count() <= 2 * logN);
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
#endif
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
gt.reset();
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
VERIFY(std::equal(s1, s1 + N, C));
// sort array s2 using make_heap/sort_heap
int s2[N];
std::copy(A, A + N, s2);
VERIFY(std::equal(s2, s2 + N, A));
std::make_heap(s2, s2 + N, gt);
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
#ifndef _GLIBCXX_DEBUG
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
VERIFY(gt.count() <= 3 * N);
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
#endif
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
gt.reset();
std::sort_heap(s2, s2 + N, gt);
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
#ifndef _GLIBCXX_DEBUG
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
VERIFY(gt.count() <= N * logN);
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
#endif
[multiple changes] 2005-12-28 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h (bitset<>::_M_copy_from_string, bitset<>::_M_copy_to_string, bitset<>::operator>>): Reverse loop. * testsuite/25_algorithms/heap/heap.cc (test01): Always enable complexity checks. * testsuite/18_support/numeric_limits/specialization.cc: Avoid unused parameter warning. * testsuite/18_support/numeric_limits/traps.cc: Acoid unused variable warning. * testsuite/ext/malloc_allocator/deallocate_global.cc: Fix format string. * testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise. * testsuite/ext/array_allocator/2.cc: Remove unused variable. * testsuite/tr1/3_function_objects/mem_fn.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Just instantiate. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/hash.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc: Avoid unused variable warnings. * testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc: Likewise. * testsuite/thread/18185.cc: Likewise. * testsuite/27_io/ios_base/storage/11584.cc: Likewise; avoid comparison between signed and unsigned warning. * testsuite/27_io/types/1.cc: Avoid unused variable warnings. * testsuite/testsuite_allocator.h (check_new): Likewise. (check_deallocate_null): Adjust return type. * testsuite/testsuite_hooks.h (bitmask_operators): Avoid unused variable warnings. * testsuite/21_strings/c_strings/wchar_t/24559.cc: Avoid unused variable warning. 2005-12-28 Chris Jefferson <chris@bubblescope.net> * include/std/std_bitset.h (bitset<0>::set, bitset<0>::reset, bitset<0>::flip, bitset<0>::test): Add inline specializations for bitset<0>. * testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (test01): Add static cast. * testsuite/tr1/6_containers/unordered/insert/set_range.cc (test01): Likewise. * testsuite/testsuite_hooks.h (operator==(NonDefaultConstructible, NonDefaultConstructible), operator<(NonDefaultConstructible, NonDefaultConstrictible)): Avoid unused parameter warning. From-SVN: r109103
2005-12-28 10:57:57 +01:00
VERIFY(std::equal(s2, s2 + N, C));
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
int
main()
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
test01();
test02();
return 0;
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}