gcc/libstdc++-v3/include/ext/throw_allocator.h

756 lines
19 KiB
C
Raw Normal View History

res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
// -*- C++ -*-
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +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) any later
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
// version.
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
// Permission to use, copy, modify, sell, and distribute this software
// is hereby granted without fee, provided that the above copyright
// notice appears in all copies, and that both that copyright notice
// and this permission notice appear in supporting documentation. None
// of the above authors, nor IBM Haifa Research Laboratories, make any
// representation about the suitability of this software for any
// purpose. It is provided "as is" without express or implied
// warranty.
/** @file ext/throw_allocator.h
throw_allocator.h: Consistent @file markup. 2006-11-29 Benjamin Kosnik <bkoz@redhat.com> * include/ext/throw_allocator.h: Consistent @file markup. * include/ext/type_traits.h: Same. * include/debug/hash_map: Same. * include/debug/hash_multimap.h: Same. * include/debug/set.h: Same. * include/debug/hash_set.h: Same. * include/debug/formatter.h: Same. * include/debug/bitset: Same. * include/debug/set: Same. * include/debug/multiset.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/hash_set: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/safe_iterator.tcc: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/hash_map.h: Same. * include/debug/string: Same. * include/debug/macros.h: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/map: Same. * include/debug/safe_iterator.h: Same. * include/debug/multimap.h: Same. * config/cpu/generic/atomicity_mutex/atomicity.h: Same. * config/cpu/generic/atomicity_builtins/atomicity.h: Same. * config/cpu/generic/atomic_word.h: Same. * include/tr1/memory: Same. * include/tr1/random: Same. * include/std/std_queue.h: Same. * include/std/std_iterator.h: Same. * include/std/std_bitset.h: Same. * include/std/std_set.h: Same. * include/std/std_vector.h: Same. * include/std/std_deque.h: Same. * include/std/std_utility.h: Same. * include/std/std_stack.h: Same. * include/std/std_string.h: Same. * include/std/std_list.h: Same. * include/std/std_map.h: Same. * libsupc++/typeinfo: Same. * libsupc++/exception: Same. * libsupc++/exception_defines.h: Same. * libsupc++/new: Same. * include/ext/bitmap_allocator.h: Change namespace __balloc to __detail. * src/bitmap_allocator.cc: Same. * include/bits/cpp_type_traits.h: Change __true_type and __false_type from global to namespace std scope. * include/ext/slist: Same. * include/ext/vstring.h: Same. * include/ext/vstring.tcc: Same. * include/ext/rc_string_base.h: Same. * include/ext/sso_string_base.h: Same. * include/bits/codecvt.h: Adjust markup so that correct namespace scope information is in all files. * include/bits/locale_facets.h: Same. Include ctype_base directly. * config/os/windiss/ctype_base.h: Add in namespace markup. * config/os/newlib/ctype_base.h: Same. * config/os/aix/ctype_base.h: Same. * config/os/vxworks/ctype_base.h: Same. * config/os/hpux/ctype_base.h: Same. * config/os/mingw32/ctype_base.h: Same. * config/os/gnu-linux/ctype_base.h: Same. * config/os/tpf/ctype_base.h: Same. * config/os/uclibc/ctype_base.h: Same. * config/os/djgpp/ctype_base.h: Same. * config/os/qnx/qnx6.1/ctype_base.h: Same. * config/os/bsd/netbsd/ctype_base.h: Same. * config/os/bsd/darwin/ctype_base.h: Same. * config/os/bsd/freebsd/ctype_base.h: Same. * config/os/irix/irix5.2/ctype_base.h: Same. * config/os/irix/irix6.5/ctype_base.h: Same. * config/os/solaris/solaris2.5/ctype_base.h: Same. * config/os/solaris/solaris2.6/ctype_base.h: Same. * config/os/solaris/solaris2.7/ctype_base.h: Same. * config/os/generic/ctype_base.h: Same. * include/tr1/mu_iterate.h: Same. * include/tr1/tuple: Same. * include/tr1/tuple_iterate.h: Same. * include/tr1/tuple_defs.h: Same. * include/tr1/random.tcc: Same. * include/tr1/functional: Same. * include/tr1/functional_iterate.h: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Line number changes. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * docs/doxygen/user.cfg.in: Update to doxygen 1.5.1. * docs/html/17_intro/license.html: Updated info for generated docs. * docs/doxygen/guide.html: Adjust. * docs/doxygen/run_doxygen: Adjust. * docs/doxygen/mainpage.html: Same. * docs/doxygen/doxygroups.cc: Same. * docs/doxygen/Intro.3: Same. * docs/doxygen/tables.html: Same. From-SVN: r119334
2006-11-29 21:59:22 +01:00
* This file is a GNU extension to the Standard C++ Library.
*
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
* Contains two exception-generating types (throw_value, throw_allocator)
* intended to be used as value and allocator types while testing
* exception safety in templatized containers and algorithms. The
* allocator has additional log and debug features. The exception
* generated is of type forced_exception_error.
throw_allocator.h: Consistent @file markup. 2006-11-29 Benjamin Kosnik <bkoz@redhat.com> * include/ext/throw_allocator.h: Consistent @file markup. * include/ext/type_traits.h: Same. * include/debug/hash_map: Same. * include/debug/hash_multimap.h: Same. * include/debug/set.h: Same. * include/debug/hash_set.h: Same. * include/debug/formatter.h: Same. * include/debug/bitset: Same. * include/debug/set: Same. * include/debug/multiset.h: Same. * include/debug/safe_sequence.h: Same. * include/debug/hash_set: Same. * include/debug/functions.h: Same. * include/debug/safe_base.h: Same. * include/debug/hash_multiset.h: Same. * include/debug/safe_iterator.tcc: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/hash_map.h: Same. * include/debug/string: Same. * include/debug/macros.h: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/map: Same. * include/debug/safe_iterator.h: Same. * include/debug/multimap.h: Same. * config/cpu/generic/atomicity_mutex/atomicity.h: Same. * config/cpu/generic/atomicity_builtins/atomicity.h: Same. * config/cpu/generic/atomic_word.h: Same. * include/tr1/memory: Same. * include/tr1/random: Same. * include/std/std_queue.h: Same. * include/std/std_iterator.h: Same. * include/std/std_bitset.h: Same. * include/std/std_set.h: Same. * include/std/std_vector.h: Same. * include/std/std_deque.h: Same. * include/std/std_utility.h: Same. * include/std/std_stack.h: Same. * include/std/std_string.h: Same. * include/std/std_list.h: Same. * include/std/std_map.h: Same. * libsupc++/typeinfo: Same. * libsupc++/exception: Same. * libsupc++/exception_defines.h: Same. * libsupc++/new: Same. * include/ext/bitmap_allocator.h: Change namespace __balloc to __detail. * src/bitmap_allocator.cc: Same. * include/bits/cpp_type_traits.h: Change __true_type and __false_type from global to namespace std scope. * include/ext/slist: Same. * include/ext/vstring.h: Same. * include/ext/vstring.tcc: Same. * include/ext/rc_string_base.h: Same. * include/ext/sso_string_base.h: Same. * include/bits/codecvt.h: Adjust markup so that correct namespace scope information is in all files. * include/bits/locale_facets.h: Same. Include ctype_base directly. * config/os/windiss/ctype_base.h: Add in namespace markup. * config/os/newlib/ctype_base.h: Same. * config/os/aix/ctype_base.h: Same. * config/os/vxworks/ctype_base.h: Same. * config/os/hpux/ctype_base.h: Same. * config/os/mingw32/ctype_base.h: Same. * config/os/gnu-linux/ctype_base.h: Same. * config/os/tpf/ctype_base.h: Same. * config/os/uclibc/ctype_base.h: Same. * config/os/djgpp/ctype_base.h: Same. * config/os/qnx/qnx6.1/ctype_base.h: Same. * config/os/bsd/netbsd/ctype_base.h: Same. * config/os/bsd/darwin/ctype_base.h: Same. * config/os/bsd/freebsd/ctype_base.h: Same. * config/os/irix/irix5.2/ctype_base.h: Same. * config/os/irix/irix6.5/ctype_base.h: Same. * config/os/solaris/solaris2.5/ctype_base.h: Same. * config/os/solaris/solaris2.6/ctype_base.h: Same. * config/os/solaris/solaris2.7/ctype_base.h: Same. * config/os/generic/ctype_base.h: Same. * include/tr1/mu_iterate.h: Same. * include/tr1/tuple: Same. * include/tr1/tuple_iterate.h: Same. * include/tr1/tuple_defs.h: Same. * include/tr1/random.tcc: Same. * include/tr1/functional: Same. * include/tr1/functional_iterate.h: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Line number changes. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * docs/doxygen/user.cfg.in: Update to doxygen 1.5.1. * docs/html/17_intro/license.html: Updated info for generated docs. * docs/doxygen/guide.html: Adjust. * docs/doxygen/run_doxygen: Adjust. * docs/doxygen/mainpage.html: Same. * docs/doxygen/doxygroups.cc: Same. * docs/doxygen/Intro.3: Same. * docs/doxygen/tables.html: Same. From-SVN: r119334
2006-11-29 21:59:22 +01:00
*/
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
#ifndef _THROW_ALLOCATOR_H
#define _THROW_ALLOCATOR_H 1
#include <cmath>
#include <ctime>
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
#include <map>
#include <string>
#include <ostream>
#include <stdexcept>
#include <utility>
#include <bits/functexcept.h>
#include <bits/move.h>
#ifdef __GXX_EXPERIMENTAL_CXX0X__
# include <functional>
# include <random>
#else
# include <tr1/functional>
# include <tr1/random>
#endif
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
* @brief Thown by exception safety machinery.
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
* @ingroup exceptions
*/
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
struct forced_error : public std::exception
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{ };
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
// Substitute for forced_error object when -fno-exceptions.
inline void
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
__throw_forced_error()
{
#if __EXCEPTIONS
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
throw forced_error();
#else
__builtin_abort();
#endif
}
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/**
* @brief Base class for checking address and label information
* about allocations. Create a std::map between the allocated
* address (void*) and a datum for annotations, which are a pair of
* numbers corresponding to label and allocated size.
*/
struct annotate_base
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{
annotate_base()
{
label();
map();
}
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
static void
set_label(size_t l)
{ label() = l; }
static size_t
get_label()
{ return label(); }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
void
insert(void* p, size_t size)
{
if (p == NULL)
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
std::string error("annotate_base::insert null insert!\n");
log_to_string(error, make_entry(p, size));
std::__throw_logic_error(error.c_str());
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
const_iterator found = map().find(p);
if (found != map().end())
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
std::string error("annotate_base::insert double insert!\n");
log_to_string(error, make_entry(p, size));
log_to_string(error, *found);
std::__throw_logic_error(error.c_str());
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
map().insert(make_entry(p, size));
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
void
erase(void* p, size_t size)
{
check_allocated(p, size);
map().erase(p);
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
// See if a particular address and allocation size has been saved.
inline void
check_allocated(void* p, size_t size)
{
const_iterator found = map().find(p);
if (found == map().end())
{
std::string error("annotate_base::check_allocated by value "
"null erase!\n");
log_to_string(error, make_entry(p, size));
std::__throw_logic_error(error.c_str());
}
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
if (found->second.second != size)
{
std::string error("annotate_base::check_allocated by value "
"wrong-size erase!\n");
log_to_string(error, make_entry(p, size));
log_to_string(error, *found);
std::__throw_logic_error(error.c_str());
}
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
// See if a given label has been allocated.
inline void
check_allocated(size_t label)
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{
const_iterator beg = map().begin();
const_iterator end = map().end();
std::string found;
while (beg != end)
{
if (beg->second.first == label)
log_to_string(found, *beg);
++beg;
}
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
if (!found.empty())
{
std::string error("annotate_base::check_allocated by label\n");
error += found;
std::__throw_logic_error(error.c_str());
}
}
private:
typedef std::pair<size_t, size_t> data_type;
typedef std::map<void*, data_type> map_type;
typedef map_type::value_type entry_type;
typedef map_type::const_iterator const_iterator;
typedef map_type::const_reference const_reference;
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
friend std::ostream&
operator<<(std::ostream&, const annotate_base&);
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
entry_type
make_entry(void* p, size_t size)
{ return std::make_pair(p, data_type(get_label(), size)); }
void
log_to_string(std::string& s, const_reference ref) const
{
char buf[40];
const char tab('\t');
s += "label: ";
unsigned long l = static_cast<unsigned long>(ref.second.first);
__builtin_sprintf(buf, "%lu", l);
s += buf;
s += tab;
s += "size: ";
l = static_cast<unsigned long>(ref.second.second);
__builtin_sprintf(buf, "%lu", l);
s += buf;
s += tab;
s += "address: ";
__builtin_sprintf(buf, "%p", ref.first);
s += buf;
s += '\n';
}
static size_t&
label()
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
static size_t _S_label(std::numeric_limits<size_t>::max());
return _S_label;
}
static map_type&
map()
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
static map_type _S_map;
return _S_map;
}
};
inline std::ostream&
operator<<(std::ostream& os, const annotate_base& __b)
{
std::string error;
typedef annotate_base base_type;
base_type::const_iterator beg = __b.map().begin();
base_type::const_iterator end = __b.map().end();
for (; beg != end; ++beg)
__b.log_to_string(error, *beg);
return os << error;
}
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/**
* @brief Base struct for condition policy.
*
* Requires a public member function with the signature
* void throw_conditionally()
*/
struct condition_base
{
virtual ~condition_base() { };
};
/**
* @brief Base class for incremental control and throw.
*/
struct limit_condition : public condition_base
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
// Scope-level adjustor objects: set limit for throw at the
// beginning of a scope block, and restores to previous limit when
// object is destroyed on exiting the block.
struct adjustor_base
{
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
private:
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
const size_t _M_orig;
public:
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
adjustor_base() : _M_orig(limit()) { }
virtual
~adjustor_base() { set_limit(_M_orig); }
};
/// Never enter the condition.
struct never_adjustor : public adjustor_base
{
never_adjustor() { set_limit(std::numeric_limits<size_t>::max()); }
};
/// Always enter the condition.
struct always_adjustor : public adjustor_base
{
always_adjustor() { set_limit(count()); }
};
/// Enter the nth condition.
struct limit_adjustor : public adjustor_base
{
limit_adjustor(const size_t __l) { set_limit(__l); }
};
// Increment _S_count every time called.
// If _S_count matches the limit count, throw.
static void
throw_conditionally()
{
if (count() == limit())
__throw_forced_error();
++count();
}
static size_t&
count()
{
static size_t _S_count(0);
return _S_count;
}
static size_t&
limit()
{
static size_t _S_limit(std::numeric_limits<size_t>::max());
return _S_limit;
}
// Zero the throw counter, set limit to argument.
static void
set_limit(const size_t __l)
{
limit() = __l;
count() = 0;
}
};
/**
* @brief Base class for random probability control and throw.
*/
struct random_condition : public condition_base
{
// Scope-level adjustor objects: set probability for throw at the
// beginning of a scope block, and restores to previous
// probability when object is destroyed on exiting the block.
struct adjustor_base
{
private:
const double _M_orig;
public:
adjustor_base() : _M_orig(probability()) { }
virtual ~adjustor_base()
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
{ set_probability(_M_orig); }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
};
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/// Group condition.
struct group_adjustor : public adjustor_base
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{
group_adjustor(size_t size)
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
{ set_probability(1 - std::pow(double(1 - probability()),
double(0.5 / (size + 1))));
}
};
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/// Never enter the condition.
struct never_adjustor : public adjustor_base
{
never_adjustor() { set_probability(0); }
};
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/// Always enter the condition.
struct always_adjustor : public adjustor_base
{
always_adjustor() { set_probability(1); }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
};
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
random_condition()
{
probability();
engine();
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
static void
set_probability(double __p)
{ probability() = __p; }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
static void
throw_conditionally()
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
if (generate() < probability())
__throw_forced_error();
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
void
seed(unsigned long __s)
{ engine().seed(__s); }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
private:
#ifdef __GXX_EXPERIMENTAL_CXX0X__
typedef std::uniform_real_distribution<double> distribution_type;
typedef std::mt19937 engine_type;
#else
typedef std::tr1::uniform_real<double> distribution_type;
typedef std::tr1::mt19937 engine_type;
#endif
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
static double
generate()
{
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const distribution_type distribution(0, 1);
static auto generator = std::bind(distribution, engine());
#else
// Use variate_generator to get normalized results.
typedef std::tr1::variate_generator<engine_type, distribution_type> gen_t;
distribution_type distribution(0, 1);
static gen_t generator(engine(), distribution);
#endif
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
double random = generator();
if (random < distribution.min() || random > distribution.max())
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
std::string __s("random_condition::generate");
__s += "\n";
__s += "random number generated is: ";
char buf[40];
__builtin_sprintf(buf, "%f", random);
__s += buf;
std::__throw_out_of_range(__s.c_str());
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
return random;
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
static double&
probability()
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
static double _S_p;
return _S_p;
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
static engine_type&
engine()
{
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
static engine_type _S_e;
return _S_e;
}
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
};
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/**
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
* @brief Class with exception generation control. Intended to be
* used as a value_type in templatized code.
*
* Note: Destructor not allowed to throw.
*/
template<typename _Cond>
struct throw_value_base : public _Cond
{
typedef _Cond condition_type;
using condition_type::throw_conditionally;
std::size_t _M_i;
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
#ifndef _GLIBCXX_IS_AGGREGATE
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
throw_value_base() : _M_i(0)
{ throw_conditionally(); }
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
throw_value_base(const throw_value_base& __v) : _M_i(__v._M_i)
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
{ throw_conditionally(); }
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
explicit throw_value_base(const std::size_t __i) : _M_i(__i)
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
{ throw_conditionally(); }
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
#endif
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
throw_value_base&
operator=(const throw_value_base& __v)
{
throw_conditionally();
_M_i = __v._M_i;
return *this;
}
throw_value_base&
operator++()
{
throw_conditionally();
++_M_i;
return *this;
}
};
template<typename _Cond>
inline void
swap(throw_value_base<_Cond>& __a, throw_value_base<_Cond>& __b)
{
typedef throw_value_base<_Cond> throw_value;
throw_value::throw_conditionally();
throw_value orig(__a);
__a = __b;
__b = orig;
}
// General instantiable types requirements.
template<typename _Cond>
inline bool
operator==(const throw_value_base<_Cond>& __a,
const throw_value_base<_Cond>& __b)
{
typedef throw_value_base<_Cond> throw_value;
throw_value::throw_conditionally();
bool __ret = __a._M_i == __b._M_i;
return __ret;
}
template<typename _Cond>
inline bool
operator<(const throw_value_base<_Cond>& __a,
const throw_value_base<_Cond>& __b)
{
typedef throw_value_base<_Cond> throw_value;
throw_value::throw_conditionally();
bool __ret = __a._M_i < __b._M_i;
return __ret;
}
// Numeric algorithms instantiable types requirements.
template<typename _Cond>
inline throw_value_base<_Cond>
operator+(const throw_value_base<_Cond>& __a,
const throw_value_base<_Cond>& __b)
{
typedef throw_value_base<_Cond> throw_value;
throw_value::throw_conditionally();
throw_value __ret(__a._M_i + __b._M_i);
return __ret;
}
template<typename _Cond>
inline throw_value_base<_Cond>
operator-(const throw_value_base<_Cond>& __a,
const throw_value_base<_Cond>& __b)
{
typedef throw_value_base<_Cond> throw_value;
throw_value::throw_conditionally();
throw_value __ret(__a._M_i - __b._M_i);
return __ret;
}
template<typename _Cond>
inline throw_value_base<_Cond>
operator*(const throw_value_base<_Cond>& __a,
const throw_value_base<_Cond>& __b)
{
typedef throw_value_base<_Cond> throw_value;
throw_value::throw_conditionally();
throw_value __ret(__a._M_i * __b._M_i);
return __ret;
}
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/// Type throwing via limit condition.
struct throw_value_limit : public throw_value_base<limit_condition>
{
typedef throw_value_base<limit_condition> base_type;
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
#ifndef _GLIBCXX_IS_AGGREGATE
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
throw_value_limit() { }
throw_value_limit(const throw_value_limit& __other)
: base_type(__other._M_i) { }
explicit throw_value_limit(const std::size_t __i) : base_type(__i) { }
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
#endif
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
};
/// Type throwing via random condition.
struct throw_value_random : public throw_value_base<random_condition>
{
typedef throw_value_base<random_condition> base_type;
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
#ifndef _GLIBCXX_IS_AGGREGATE
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
throw_value_random() { }
throw_value_random(const throw_value_random& __other)
: base_type(__other._M_i) { }
explicit throw_value_random(const std::size_t __i) : base_type(__i) { }
PR libstdc++/21772 part 3 2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
2010-01-01 04:38:58 +01:00
#endif
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
};
/**
* @brief Allocator class with logging and exception generation control.
* Intended to be used as an allocator_type in templatized code.
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
* @ingroup allocators
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
*
* Note: Deallocate not allowed to throw.
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
*/
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
template<typename _Tp, typename _Cond>
class throw_allocator_base
: public annotate_base, public _Cond
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{
public:
typelist.h (type_to_type): Remove. 2006-09-27 Benjamin Kosnik <bkoz@redhat.com> * include/ext/typelist.h (type_to_type): Remove. * include/ext/throw_allocator.h (assert_allocatod): Remove. (check_allocated(label)): New. (print_to_string): Print numerical output correctly. * testsuite/ext/pb_ds/example/hash_resize_neg.cc: Adjust line numbers. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Set and clear label, throw probability. Check only allocations of the marked label. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/performance/ext/pb_ds/text_find_timing.cc: Adjustments for removal of type_to_type. * testsuite/performance/ext/pb_ds/ hash_random_int_erase_mem_usage.cc: Same. * testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_push_timing.cc: Same. * testsuite/performance/ext/pb_ds/ random_int_subscript_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/tree_split_join_timing.cc: Same. * testsuite/performance/ext/pb_ds/random_int_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/ multimap_text_insert_mem_usage.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_random_int_push_timing.cc: Same. * testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_modify_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ tree_order_statistics_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_push_pop_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_join_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_random_int_push_pop_timing.cc: Same. * testsuite/performance/ext/pb_ds/ random_int_subscript_insert_timing.cc: Same. * testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/ multimap_text_insert_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_pop_mem_usage.cc: Same. * testsuite/performance/ext/pb_ds/ hash_zlob_random_int_find_timing.cc: Same. * testsuite/util/regression/trait/assoc/type_trait.hpp: Same. * testsuite/util/regression/rand/priority_queue/ rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/common_type/assoc/common_type.hpp: Same. * testsuite/util/common_type/assoc/string_form.hpp: Same. * testsuite/util/common_type/assoc/template_policy.hpp: Same. * testsuite/util/common_type/assoc/native_set.hpp: Same. * testsuite/util/performance/priority_queue/mem_usage/ pop_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/ push_pop_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/join_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/push_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/ modify_test.hpp: Same. * testsuite/util/performance/assoc/mem_usage/ multimap_insert_test.hpp: Same. * testsuite/util/performance/assoc/mem_usage/erase_test.hpp: Same. * testsuite/util/performance/assoc/timing/ multimap_insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/ subscript_find_test.hpp: Same. * testsuite/util/performance/assoc/timing/find_test.hpp: Same. * testsuite/util/performance/assoc/timing/ subscript_insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/ tree_order_statistics_test.hpp: Same. * testsuite/util/performance/assoc/timing/multimap_find_test.hpp: Same. * testsuite/util/performance/assoc/timing/ tree_split_join_test.hpp: Same. * testsuite/util/performance/assoc/multimap_common_type.hpp: Same. * testsuite/util/testsuite_common_types.h: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: Typedef normalization, consistency in member names between cc and gp hash tables, formatting fixes. * include/ext/pb_ds/detail/cc_hash_table_map_/ erase_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ erase_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ erase_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ erase_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/assoc_container.hpp: Formatting fixes. * include/ext/pb_ds/detail/resize_policy/ hash_prime_size_policy_imp.hpp: Same. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Same. * include/ext/pb_ds/detail/types_traits.hpp: Same. * include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ direct_mod_range_hashing_imp.hpp: Same. * include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ direct_mask_range_hashing_imp.hpp: Same. From-SVN: r117268
2006-09-28 03:23:58 +02:00
typedef size_t size_type;
typedef ptrdiff_t difference_type;
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
typedef _Tp value_type;
typelist.h (type_to_type): Remove. 2006-09-27 Benjamin Kosnik <bkoz@redhat.com> * include/ext/typelist.h (type_to_type): Remove. * include/ext/throw_allocator.h (assert_allocatod): Remove. (check_allocated(label)): New. (print_to_string): Print numerical output correctly. * testsuite/ext/pb_ds/example/hash_resize_neg.cc: Adjust line numbers. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Set and clear label, throw probability. Check only allocations of the marked label. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/performance/ext/pb_ds/text_find_timing.cc: Adjustments for removal of type_to_type. * testsuite/performance/ext/pb_ds/ hash_random_int_erase_mem_usage.cc: Same. * testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_push_timing.cc: Same. * testsuite/performance/ext/pb_ds/ random_int_subscript_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/tree_split_join_timing.cc: Same. * testsuite/performance/ext/pb_ds/random_int_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/ multimap_text_insert_mem_usage.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_random_int_push_timing.cc: Same. * testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_modify_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ tree_order_statistics_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_push_pop_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_join_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_random_int_push_pop_timing.cc: Same. * testsuite/performance/ext/pb_ds/ random_int_subscript_insert_timing.cc: Same. * testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/ multimap_text_insert_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_pop_mem_usage.cc: Same. * testsuite/performance/ext/pb_ds/ hash_zlob_random_int_find_timing.cc: Same. * testsuite/util/regression/trait/assoc/type_trait.hpp: Same. * testsuite/util/regression/rand/priority_queue/ rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/common_type/assoc/common_type.hpp: Same. * testsuite/util/common_type/assoc/string_form.hpp: Same. * testsuite/util/common_type/assoc/template_policy.hpp: Same. * testsuite/util/common_type/assoc/native_set.hpp: Same. * testsuite/util/performance/priority_queue/mem_usage/ pop_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/ push_pop_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/join_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/push_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/ modify_test.hpp: Same. * testsuite/util/performance/assoc/mem_usage/ multimap_insert_test.hpp: Same. * testsuite/util/performance/assoc/mem_usage/erase_test.hpp: Same. * testsuite/util/performance/assoc/timing/ multimap_insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/ subscript_find_test.hpp: Same. * testsuite/util/performance/assoc/timing/find_test.hpp: Same. * testsuite/util/performance/assoc/timing/ subscript_insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/ tree_order_statistics_test.hpp: Same. * testsuite/util/performance/assoc/timing/multimap_find_test.hpp: Same. * testsuite/util/performance/assoc/timing/ tree_split_join_test.hpp: Same. * testsuite/util/performance/assoc/multimap_common_type.hpp: Same. * testsuite/util/testsuite_common_types.h: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: Typedef normalization, consistency in member names between cc and gp hash tables, formatting fixes. * include/ext/pb_ds/detail/cc_hash_table_map_/ erase_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ erase_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ erase_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ erase_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/assoc_container.hpp: Formatting fixes. * include/ext/pb_ds/detail/resize_policy/ hash_prime_size_policy_imp.hpp: Same. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Same. * include/ext/pb_ds/detail/types_traits.hpp: Same. * include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ direct_mod_range_hashing_imp.hpp: Same. * include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ direct_mask_range_hashing_imp.hpp: Same. From-SVN: r117268
2006-09-28 03:23:58 +02:00
typedef value_type* pointer;
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
private:
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
typedef _Cond condition_type;
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
std::allocator<value_type> _M_allocator;
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
using condition_type::throw_conditionally;
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
public:
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
size_type
max_size() const throw()
{ return _M_allocator.max_size(); }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
pointer
allocate(size_type __n, std::allocator<void>::const_pointer hint = 0)
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{
if (__n > this->max_size())
std::__throw_bad_alloc();
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
throw_conditionally();
pointer const a = _M_allocator.allocate(__n, hint);
insert(a, sizeof(value_type) * __n);
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
return a;
}
void
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
construct(pointer __p, const value_type& val)
{ return _M_allocator.construct(__p, val); }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
throw_allocator.h (throw_allocator<>:: construct<>(pointer, _Args&&...)): Add. 2007-10-26 Paolo Carlini <pcarlini@suse.de> * include/ext/throw_allocator.h (throw_allocator<>:: construct<>(pointer, _Args&&...)): Add. * include/ext/pool_allocator.h (__pool_alloc<>:: construct<>(pointer, _Args&&...)): Likewise. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/bitmap_allocator.h (bitmap_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/new_allocator.h (new_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/malloc_allocator.h (malloc_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/array_allocator.h (array_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/mt_allocator.h (__mt_alloc<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * testsuite/util/testsuite_allocator.h (tracker_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. (uneq_allocator<>::construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * testsuite/ext/mt_allocator/variadic_construct.cc: New. * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise. * testsuite/ext/malloc_allocator/variadic_construct.cc: Likewise. * testsuite/ext/pool_allocator/variadic_construct.cc: Likewise. * testsuite/ext/bitmap_allocator/variadic_construct.cc: Likewise. * testsuite/ext/array_allocator/variadic_construct.cc: Likewise. From-SVN: r129672
2007-10-27 02:41:21 +02:00
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<typename... _Args>
void
construct(pointer __p, _Args&&... __args)
{ return _M_allocator.construct(__p, std::forward<_Args>(__args)...); }
throw_allocator.h (throw_allocator<>:: construct<>(pointer, _Args&&...)): Add. 2007-10-26 Paolo Carlini <pcarlini@suse.de> * include/ext/throw_allocator.h (throw_allocator<>:: construct<>(pointer, _Args&&...)): Add. * include/ext/pool_allocator.h (__pool_alloc<>:: construct<>(pointer, _Args&&...)): Likewise. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/bitmap_allocator.h (bitmap_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/new_allocator.h (new_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/malloc_allocator.h (malloc_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/array_allocator.h (array_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * include/ext/mt_allocator.h (__mt_alloc<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * testsuite/util/testsuite_allocator.h (tracker_allocator<>:: construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. (uneq_allocator<>::construct<>(pointer, _Args&&...)): Add. (construct(pointer, const _Tp&)): Cast pointer to void*. * testsuite/ext/mt_allocator/variadic_construct.cc: New. * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise. * testsuite/ext/malloc_allocator/variadic_construct.cc: Likewise. * testsuite/ext/pool_allocator/variadic_construct.cc: Likewise. * testsuite/ext/bitmap_allocator/variadic_construct.cc: Likewise. * testsuite/ext/array_allocator/variadic_construct.cc: Likewise. From-SVN: r129672
2007-10-27 02:41:21 +02:00
#endif
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
void
destroy(pointer __p)
{ _M_allocator.destroy(__p); }
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
void
deallocate(pointer __p, size_type __n)
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{
erase(__p, sizeof(value_type) * __n);
_M_allocator.deallocate(__p, __n);
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
}
void
check_allocated(pointer __p, size_type __n)
{
size_type __t = sizeof(value_type) * __n;
annotate_base::check_allocated(__p, __t);
}
typelist.h (type_to_type): Remove. 2006-09-27 Benjamin Kosnik <bkoz@redhat.com> * include/ext/typelist.h (type_to_type): Remove. * include/ext/throw_allocator.h (assert_allocatod): Remove. (check_allocated(label)): New. (print_to_string): Print numerical output correctly. * testsuite/ext/pb_ds/example/hash_resize_neg.cc: Adjust line numbers. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Set and clear label, throw probability. Check only allocations of the marked label. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/performance/ext/pb_ds/text_find_timing.cc: Adjustments for removal of type_to_type. * testsuite/performance/ext/pb_ds/ hash_random_int_erase_mem_usage.cc: Same. * testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_push_timing.cc: Same. * testsuite/performance/ext/pb_ds/ random_int_subscript_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/tree_split_join_timing.cc: Same. * testsuite/performance/ext/pb_ds/random_int_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/ multimap_text_insert_mem_usage.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_random_int_push_timing.cc: Same. * testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_modify_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ tree_order_statistics_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_push_pop_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_join_timing.cc: Same. * testsuite/performance/ext/pb_ds/ priority_queue_random_int_push_pop_timing.cc: Same. * testsuite/performance/ext/pb_ds/ random_int_subscript_insert_timing.cc: Same. * testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc: Same. * testsuite/performance/ext/pb_ds/ multimap_text_insert_timing.hpp: Same. * testsuite/performance/ext/pb_ds/ priority_queue_text_pop_mem_usage.cc: Same. * testsuite/performance/ext/pb_ds/ hash_zlob_random_int_find_timing.cc: Same. * testsuite/util/regression/trait/assoc/type_trait.hpp: Same. * testsuite/util/regression/rand/priority_queue/ rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/common_type/assoc/common_type.hpp: Same. * testsuite/util/common_type/assoc/string_form.hpp: Same. * testsuite/util/common_type/assoc/template_policy.hpp: Same. * testsuite/util/common_type/assoc/native_set.hpp: Same. * testsuite/util/performance/priority_queue/mem_usage/ pop_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/ push_pop_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/join_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/push_test.hpp: Same. * testsuite/util/performance/priority_queue/timing/ modify_test.hpp: Same. * testsuite/util/performance/assoc/mem_usage/ multimap_insert_test.hpp: Same. * testsuite/util/performance/assoc/mem_usage/erase_test.hpp: Same. * testsuite/util/performance/assoc/timing/ multimap_insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/ subscript_find_test.hpp: Same. * testsuite/util/performance/assoc/timing/find_test.hpp: Same. * testsuite/util/performance/assoc/timing/ subscript_insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/insert_test.hpp: Same. * testsuite/util/performance/assoc/timing/ tree_order_statistics_test.hpp: Same. * testsuite/util/performance/assoc/timing/multimap_find_test.hpp: Same. * testsuite/util/performance/assoc/timing/ tree_split_join_test.hpp: Same. * testsuite/util/performance/assoc/multimap_common_type.hpp: Same. * testsuite/util/testsuite_common_types.h: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: Typedef normalization, consistency in member names between cc and gp hash tables, formatting fixes. * include/ext/pb_ds/detail/cc_hash_table_map_/ erase_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ erase_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ erase_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ erase_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/assoc_container.hpp: Formatting fixes. * include/ext/pb_ds/detail/resize_policy/ hash_prime_size_policy_imp.hpp: Same. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Same. * include/ext/pb_ds/detail/types_traits.hpp: Same. * include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp: Same. * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ direct_mod_range_hashing_imp.hpp: Same. * include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp: Same. * include/ext/pb_ds/detail/hash_fn/ direct_mask_range_hashing_imp.hpp: Same. From-SVN: r117268
2006-09-28 03:23:58 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
void
check_allocated(size_type __n)
{ annotate_base::check_allocated(__n); }
};
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
template<typename _Tp, typename _Cond>
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
inline bool
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
operator==(const throw_allocator_base<_Tp, _Cond>&,
const throw_allocator_base<_Tp, _Cond>&)
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{ return true; }
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
template<typename _Tp, typename _Cond>
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
inline bool
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
operator!=(const throw_allocator_base<_Tp, _Cond>&,
const throw_allocator_base<_Tp, _Cond>&)
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
{ return false; }
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
/// Allocator throwing via limit condition.
template<typename _Tp>
struct throw_allocator_limit
: public throw_allocator_base<_Tp, limit_condition>
{
template<typename _Tp1>
struct rebind
{ typedef throw_allocator_limit<_Tp1> other; };
throw_allocator_limit() throw() { }
throw_allocator_limit(const throw_allocator_limit&) throw() { }
template<typename _Tp1>
throw_allocator_limit(const throw_allocator_limit<_Tp1>&) throw() { }
~throw_allocator_limit() throw() { }
};
/// Allocator throwing via random condition.
template<typename _Tp>
struct throw_allocator_random
: public throw_allocator_base<_Tp, random_condition>
{
template<typename _Tp1>
struct rebind
{ typedef throw_allocator_random<_Tp1> other; };
throw_allocator_random() throw() { }
throw_allocator_random(const throw_allocator_random&) throw() { }
template<typename _Tp1>
throw_allocator_random(const throw_allocator_random<_Tp1>&) throw() { }
~throw_allocator_random() throw() { }
};
res_mng: Remove. 2006-09-18 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng/dbg_ex_allocator_base.cc: Merge.. * testsuite/util/regression/res_mng/forced_exception.hpp: Merge... * testsuite/util/regression/res_mng/dbg_ex_allocator_base.hpp: Merge.. * testsuite/util/regression/res_mng/dbg_ex_allocator.hpp: Merge.. * testsuite/util/testsuite_allocator.h (throw_allocator): Merge... * include/ext/throw_allocator.h (throw_allocator): ... into this. * src/throw_allocator.cc: ...and this. * include/Makefile.am (ext_headers): Add. * include/Makefile.in: Regenerate. * src/Makefile.am (sources): New. * src/Makefile.in: Regenerate. * testsuite/lib/libstdc++.exp: Subtract dbg_ex_allocator_base.cc. * include/ext/pb_ds/detail/map_debug_base.hpp: Adjust includes, names, and namespaces. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/util/regression/rand/priority_queue/detail/ erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ constructor_destructor_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ modify_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ subscript_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ constructor_destructor_fn_imps.hpp * testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ split_join_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/priority_queue/common_type.hpp: Same. * testsuite/util/regression/assoc/common_type.hpp: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/util/rng/twister_rand_gen.cc: Tweak. From-SVN: r117050
2006-09-19 04:33:21 +02:00
_GLIBCXX_END_NAMESPACE
PR libstdc++/21772 part 1 2009-12-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 1 * include/ext/throw_allocator.h: Rework. (__gnu_cxx::throw_allocator): To... (__gnu_cxx::throw_allocator_limit): ...this. (__gnu_cxx::throw_allocator_random): ...and this. (throw_value_base, throw_value_limit, throw_value_random): Add. (condition_base, random_condition, limit_condition): Add. (forced_exception_error): To... (forced_error): ...this. * testsuite/ext/throw_value: New. * testsuite/ext/throw_value/cons.cc: New. * testsuite/ext/throw_allocator/deallocate_global.cc: Adjust for throw_allocator, forced_exception_error changes. * testsuite/ext/throw_allocator/check_delete.cc: Same. * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same. * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same. * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same. * testsuite/ext/throw_allocator/check_new.cc: Same. * testsuite/ext/throw_allocator/variadic_construct.cc: Same. * testsuite/ext/throw_allocator/deallocate_local.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.cc: Same. * testsuite/23_containers/list/modifiers/insert/25288.h: Same. * testsuite/util/regression/common_type.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.h: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.tcc: Same. * testsuite/util/regression/basic_type.hpp: Same. * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc: To... * testsuite/ext/forced_error/cons_virtual_derivation.cc: ...this, same. From-SVN: r155283
2009-12-16 06:16:46 +01:00
#ifdef __GXX_EXPERIMENTAL_CXX0X__
# include <bits/functional_hash.h>
namespace std
{
/// Explicit specialization of std::hash for __gnu_cxx::throw_value_limit.
template<>
struct hash<__gnu_cxx::throw_value_limit>
: public std::unary_function<__gnu_cxx::throw_value_limit, size_t>
{
size_t
operator()(__gnu_cxx::throw_value_limit __val) const
{
std::hash<std::size_t> h;
size_t __result = h(__val._M_i);
return __result;
}
};
/// Explicit specialization of std::hash for __gnu_cxx::throw_value_limit.
template<>
struct hash<__gnu_cxx::throw_value_random>
: public std::unary_function<__gnu_cxx::throw_value_random, size_t>
{
size_t
operator()(__gnu_cxx::throw_value_random __val) const
{
std::hash<std::size_t> h;
size_t __result = h(__val._M_i);
return __result;
}
};
} // end namespace std
#endif
#endif