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

641 lines
19 KiB
C
Raw Normal View History

algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
// Raw memory manipulators -*- C++ -*-
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
// 2009, 2010
// Free Software Foundation, Inc.
algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// 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.
algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
// 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/>.
algo.h: Add "GPL plus runtime exception" comment block, this time for real. 2001-06-27 Phil Edwards <pme@sources.redhat.com> * include/backward/algo.h: Add "GPL plus runtime exception" comment block, this time for real. * include/backward/algobase.h: Likewise. * include/backward/alloc.h: Likewise. * include/backward/bvector.h: Likewise. * include/backward/defalloc.h: Likewise. * include/backward/deque.h: Likewise. * include/backward/function.h: Likewise. * include/backward/hash_map.h: Likewise. * include/backward/hash_set.h: Likewise. * include/backward/hashtable.h: Likewise. * include/backward/heap.h: Likewise. * include/backward/iterator.h: Likewise. * include/backward/list.h: Likewise. * include/backward/map.h: Likewise. * include/backward/multimap.h: Likewise. * include/backward/multiset.h: Likewise. * include/backward/pair.h: Likewise. * include/backward/rope.h: Likewise. * include/backward/set.h: Likewise. * include/backward/slist.h: Likewise. * include/backward/stack.h: Likewise. * include/backward/strstream: Likewise. * include/backward/tempbuf.h: Likewise. * include/backward/tree.h: Likewise. * include/backward/vector.h: Likewise. * include/bits/pthread_allocimpl.h: Likewise. * include/bits/std_algorithm.h: Likewise. * include/bits/std_bitset.h: Likewise. * include/bits/std_deque.h: Likewise. * include/bits/std_functional.h: Likewise. * include/bits/std_iterator.h: Likewise. * include/bits/std_list.h: Likewise. * include/bits/std_map.h: Likewise. * include/bits/std_memory.h: Likewise. * include/bits/std_numeric.h: Likewise. * include/bits/std_queue.h: Likewise. * include/bits/std_set.h: Likewise. * include/bits/std_stack.h: Likewise. * include/bits/std_utility.h: Likewise. * include/bits/std_vector.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_alloc.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_function.h: Likewise. * include/bits/stl_heap.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_iterator_base_types.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_numeric.h: Likewise. * include/bits/stl_pair.h: Likewise. * include/bits/stl_pthread_alloc.h: Likewise. * include/bits/stl_queue.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/stl_threads.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/type_traits.h: Likewise. * include/ext/hash_map: Likewise. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * src/bitset.cc: Likewise. * src/strstream.cc: Likewise. From-SVN: r43613
2001-06-27 19:09:53 +02:00
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_uninitialized.h
c_io_stdio.h: Correct grammar in comments. 2001-11-02 Phil Edwards <pme@gcc.gnu.org> * config/io/c_io_stdio.h: Correct grammar in comments. * docs/doxygen/Intro.3: Expand "top-level" man page. * docs/doxygen/doxygroups.cc: New module definitions (comments). * docs/doxygen/mainpage.doxy: Tweaks. * docs/doxygen/run_doxygen: Update Doxygen version, massage man pages. Add @file hooks so that headers are considered to be documented. * include/bits/basic_ios.h, include/bits/basic_file.h, include/bits/basic_string.h, include/bits/boost_concept_check.h, include/bits/char_traits.h, include/bits/codecvt.h, include/bits/concept_check.h, include/bits/cpp_type_traits.h, include/bits/fpos.h, include/bits/gslice.h, include/bits/gslice_array.h, include/bits/indirect_array.h, include/bits/ios_base.h, include/bits/locale_facets.h, include/bits/localefwd.h, include/bits/mask_array.h, include/bits/pthread_allocimpl.h, include/bits/slice.h, include/bits/slice_array.h, include/bits/std_algorithm.h, include/bits/std_bitset.h, include/bits/std_complex.h, include/bits/std_deque.h, include/bits/std_fstream.h, include/bits/std_functional.h, include/bits/std_iomanip.h, include/bits/std_ios.h, include/bits/std_iosfwd.h, include/bits/std_iostream.h, include/bits/std_istream.h, include/bits/std_iterator.h, include/bits/std_limits.h, include/bits/std_list.h, include/bits/std_locale.h, include/bits/std_map.h, include/bits/std_memory.h, include/bits/std_numeric.h, include/bits/std_ostream.h, include/bits/std_queue.h, include/bits/std_set.h, include/bits/std_sstream.h, include/bits/std_stack.h, include/bits/std_streambuf.h, include/bits/std_string.h, include/bits/std_utility.h, include/bits/std_valarray.h, include/bits/std_vector.h, include/bits/stl_algo.h, include/bits/stl_alloc.h, include/bits/stl_bvector.h, include/bits/stl_construct.h, include/bits/stl_deque.h, include/bits/stl_heap.h, include/bits/stl_iterator.h, include/bits/stl_iterator_base_funcs.h, include/bits/stl_iterator_base_types.h, include/bits/stl_list.h, include/bits/stl_map.h, include/bits/stl_multimap.h, include/bits/stl_multiset.h, include/bits/stl_numeric.h, include/bits/stl_pair.h, include/bits/stl_pthread_alloc.h, include/bits/stl_queue.h, include/bits/stl_raw_storage_iter.h, include/bits/stl_relops.h, include/bits/stl_set.h, include/bits/stl_stack.h, include/bits/stl_tempbuf.h, include/bits/stl_threads.h, include/bits/stl_tree.h, include/bits/stl_uninitialized.h, include/bits/stl_vector.h, include/bits/stream_iterator.h, include/bits/streambuf_iterator.h, include/bits/stringfwd.h, include/bits/type_traits.h, include/bits/valarray_array.h, include/bits/valarray_meta.h: Add hooks, tweak comments only. * include/bits/stl_algobase.h (swap, min, iter_swap): Also document these functions. * include/bits/stl_function.h: Tweak link comments. From-SVN: r46717
2001-11-02 18:38:11 +01:00
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _STL_UNINITIALIZED_H
#define _STL_UNINITIALIZED_H 1
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/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/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.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_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_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/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_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/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_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/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
template<bool _TrivialValueTypes>
struct __uninitialized_copy
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
template<typename _InputIterator, typename _ForwardIterator>
static _ForwardIterator
__uninit_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{
_ForwardIterator __cur = __result;
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
{
for (; __first != __last; ++__first, ++__cur)
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
std::_Construct(std::__addressof(*__cur), *__first);
return __cur;
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_copy<true>
{
template<typename _InputIterator, typename _ForwardIterator>
static _ForwardIterator
__uninit_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{ return std::copy(__first, __last, __result); }
};
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
/**
* @brief Copies the range [first,last) into result.
* @param first An input iterator.
* @param last An input iterator.
* @param result An output iterator.
* @return result + (first - last)
*
* Like copy(), but does not require an initialized output range.
*/
template<typename _InputIterator, typename _ForwardIterator>
inline _ForwardIterator
uninitialized_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
typedef typename iterator_traits<_InputIterator>::value_type
_ValueType1;
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType2;
return std::__uninitialized_copy<(__is_trivial(_ValueType1)
&& __is_trivial(_ValueType2))>::
__uninit_copy(__first, __last, __result);
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
template<bool _TrivialValueType>
struct __uninitialized_fill
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
template<typename _ForwardIterator, typename _Tp>
static void
__uninit_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{
_ForwardIterator __cur = __first;
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
{
for (; __cur != __last; ++__cur)
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
std::_Construct(std::__addressof(*__cur), __x);
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_fill<true>
{
template<typename _ForwardIterator, typename _Tp>
static void
__uninit_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{ std::fill(__first, __last, __x); }
};
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
/**
* @brief Copies the value x into the range [first,last).
* @param first An input iterator.
* @param last An input iterator.
* @param x The source value.
* @return Nothing.
*
* Like fill(), but does not require an initialized output range.
*/
template<typename _ForwardIterator, typename _Tp>
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
inline void
uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::__uninitialized_fill<__is_trivial(_ValueType)>::
__uninit_fill(__first, __last, __x);
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
template<bool _TrivialValueType>
struct __uninitialized_fill_n
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
template<typename _ForwardIterator, typename _Size, typename _Tp>
static void
__uninit_fill_n(_ForwardIterator __first, _Size __n,
const _Tp& __x)
{
_ForwardIterator __cur = __first;
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
{
for (; __n > 0; --__n, ++__cur)
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
std::_Construct(std::__addressof(*__cur), __x);
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_fill_n<true>
{
template<typename _ForwardIterator, typename _Size, typename _Tp>
static void
__uninit_fill_n(_ForwardIterator __first, _Size __n,
const _Tp& __x)
{ std::fill_n(__first, __n, __x); }
};
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
/**
* @brief Copies the value x into the range [first,first+n).
* @param first An input iterator.
* @param n The number of copies to make.
* @param x The source value.
* @return Nothing.
*
* Like fill_n(), but does not require an initialized output range.
*/
template<typename _ForwardIterator, typename _Size, typename _Tp>
inline void
uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::__uninitialized_fill_n<__is_trivial(_ValueType)>::
__uninit_fill_n(__first, __n, __x);
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
// Extensions: versions of uninitialized_copy, uninitialized_fill,
// and uninitialized_fill_n that take an allocator parameter.
// We dispatch back to the standard versions when we're given the
// default allocator. For nondefault allocators we do not use
// any of the POD optimizations.
template<typename _InputIterator, typename _ForwardIterator,
typename _Allocator>
_ForwardIterator
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, _Allocator& __alloc)
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
_ForwardIterator __cur = __result;
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
for (; __first != __last; ++__first, ++__cur)
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
__alloc.construct(std::__addressof(*__cur), *__first);
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
return __cur;
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
inline _ForwardIterator
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, allocator<_Tp>&)
{ return std::uninitialized_copy(__first, __last, __result); }
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
template<typename _InputIterator, typename _ForwardIterator,
typename _Allocator>
inline _ForwardIterator
__uninitialized_move_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, _Allocator& __alloc)
{
return std::__uninitialized_copy_a(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
_GLIBCXX_MAKE_MOVE_ITERATOR(__last),
__result, __alloc);
}
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
template<typename _ForwardIterator, typename _Tp, typename _Allocator>
void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, _Allocator& __alloc)
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
_ForwardIterator __cur = __first;
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
for (; __cur != __last; ++__cur)
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
__alloc.construct(std::__addressof(*__cur), __x);
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Tp, typename _Tp2>
inline void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, allocator<_Tp2>&)
{ std::uninitialized_fill(__first, __last, __x); }
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Allocator>
void
__uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
const _Tp& __x, _Allocator& __alloc)
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
_ForwardIterator __cur = __first;
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
for (; __n > 0; --__n, ++__cur)
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
__alloc.construct(std::__addressof(*__cur), __x);
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Tp2>
inline void
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
__uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
const _Tp& __x, allocator<_Tp2>&)
{ std::uninitialized_fill_n(__first, __n, __x); }
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
// Extensions: __uninitialized_copy_move, __uninitialized_move_copy,
// __uninitialized_fill_move, __uninitialized_move_fill.
// All of these algorithms take a user-supplied allocator, which is used
// for construction and destruction.
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
// __uninitialized_copy_move
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// Copies [first1, last1) into [result, result + (last1 - first1)), and
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
// move [first2, last2) into
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// [result, result + (last1 - first1) + (last2 - first2)).
template<typename _InputIterator1, typename _InputIterator2,
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
typename _ForwardIterator, typename _Allocator>
inline _ForwardIterator
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
__uninitialized_copy_move(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
_ForwardIterator __result,
_Allocator& __alloc)
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
_ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
__result,
__alloc);
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
{
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
// __uninitialized_move_copy
// Moves [first1, last1) into [result, result + (last1 - first1)), and
// copies [first2, last2) into
// [result, result + (last1 - first1) + (last2 - first2)).
template<typename _InputIterator1, typename _InputIterator2,
typename _ForwardIterator, typename _Allocator>
inline _ForwardIterator
__uninitialized_move_copy(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_ForwardIterator __result,
_Allocator& __alloc)
{
_ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
__result,
__alloc);
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
{
return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
}
// __uninitialized_fill_move
// Fills [result, mid) with x, and moves [first, last) into
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// [mid, mid + (last - first)).
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
template<typename _ForwardIterator, typename _Tp, typename _InputIterator,
typename _Allocator>
inline _ForwardIterator
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
__uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid,
const _Tp& __x, _InputIterator __first,
_InputIterator __last, _Allocator& __alloc)
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
{
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
// __uninitialized_move_fill
// Moves [first1, last1) into [first2, first2 + (last1 - first1)), and
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
// fills [first2 + (last1 - first1), last2) with x.
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
template<typename _InputIterator, typename _ForwardIterator, typename _Tp,
typename _Allocator>
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
inline void
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
__uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1,
_ForwardIterator __first2,
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
_ForwardIterator __last2, const _Tp& __x,
_Allocator& __alloc)
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
{
stl_deque.h (deque<>::push_back<>(_Args...), [...]): Add. 2007-11-12 Chris Jefferson <chris@bubblescope.net> Paolo Carlini <pcarlini@suse.de> * include/bits/stl_deque.h (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Add. * include/deque/deque.tcc (insert(iterator, value_type&&), emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...), _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator, _Args&&...)): Define. (_M_insert_aux(iterator, size_type, const value_type&), _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator, size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, __uninitialized_move*, __uninitialized_fill_move, __uninitialized_copy_move, when possible. * include/bits/stl_uninitialized.h (__uninitialized_copy_copy, __uninitialized_fill_copy, __uninitialized_copy_fill): Remove. (__uninitialized_copy_move, __uninitialized_move_copy, __uninitialized_move_fill, __uninitialized_fill_move): Add. * include/debug/deque (deque<>::push_back<>(_Args...), deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add. * testsuite/23_containers/deque/modifiers/moveable.cc: Enable. * testsuite/23_containers/deque/capacity/moveable.cc: Likewise. * testsuite/23_containers/deque/cons/moveable.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor tweak, prefer std::move. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r130102
2007-11-12 17:01:09 +01:00
_ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
__first2,
__alloc);
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
{
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. * include/bits/stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument. Another inline three-argument overload that takes std::allocator and dispatches to the two-argument version. * include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux): Change return type to void to match uninitialized_fill_n. (__uninitialized_copy_a_): New function. Like uninitialized_copy except that it takes an allocator and uses it for construct and destroy. If the allocator is std::allocator, dispatches to uninitialized_copy. (__uninitialized_fill_a): Likewise. (__uninitialized_fill_n_a): Likewise. (__uninitialized_copy_copy): Give it an allocator argument. (__uninitialized_fill_copy): Likewise. (__uninitialized_copy_fill): Likewise. * include/bits/deque.tcc: Use new forms defined in stl_construct.h and stl_uninitialized.h. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/bits/list.tcc: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/hashtable.h: Use rebind so that allocator_type has correct type for a container's allocator. Replace use of single-argument _Construct and _Destroy with use of allocator's construct and destroy methods. * include/ext/memory (__uninitialized_copy_n_a): New function. Like uninitialized_copy_n except that it takes an extra parameter, an allocator, and uses it for construct and destroy operations. * include/ext/rope: Use new forms defined in stl_construct.h, stl_uninitialized.h, and ext/memory. Replace use of single-argument _Construct and _Destroy with allocator construct and destroy methods. * include/ext/ropeimpl.h: Likewise. * include/ext/slist.h: Likewise. * testsuite/testsuite_allocator.h (check_construct_destroy): New. * testsuite/testsuite_allocator.cc (check_construct_destroy): New. * testsuite/23_containers/deque/check_construct_destroy.cc: New. * testsuite/23_containers/list/check_construct_destroy.cc: New. * testsuite/23_containers/set/check_construct_destroy.cc: New. * testsuite/23_containers/vector/check_construct_destroy.cc: New. * testsuite/ext/hash_check_construct_destroy.cc: New. * testsuite/ext/slist_check_construct_destroy.cc: New. From-SVN: r85265
2004-07-28 18:37:20 +02:00
std::_Destroy(__first2, __mid2, __alloc);
__throw_exception_again;
}
All occurrences of the __value_type() and __distance_type() functions... 2001-07-17 Stephen M. Webb <stephen@bregmasoft.com>r All occurrences of the __value_type() and __distance_type() functions, which were required to support the HP STL, have been removed along with all the auxiliary forwarding functions that were required to support their use. The __iterator_category() function was pretty much left alone because there was no benefit to removing it and its use made code just a little more readable. Incidences of distance() with nonstandard argument list were replaced by calls to the standard function (only in the files affected by the removal of the other HP functions). The signature of the rotate() algorithm was changed to match the standard. Headers were reformatted under C++STYLE guidelines (indentation, linebreaks, typename keyword). * include/bits/stl_algo.h: replaced __value_type() and __distance_type() with iterator_traits, eliminated auxiliary support functions required to support said function usage. Changed nonstandard distance() call to standard call. * include/bits/stl_algobase.h: Same. * include/bits/stl_heap.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_iterator_base_types.h (__value_type()): Removed. (__distance_type()): Removed. (value_type()): Gone. (distance_type()): Done in. (iterator_category()): Hasta la vista, baby. * include/bits/stl_iterator_base_funcs.h (iterator_category()): Replaced with __iterator_category(). * include/backward/iterator.h: moved definition of value_type(), distance_type(), and iterator_category() out of std:: and into here. * testsuite/23_containers/vector_ctor.cc (test03): New testcases. * testsuite/23_containers/vector_modifiers.cc (test03): New testcases. * testsuite/25_algorithms/rotate.cc: New testcase. * testsuite/25_algorithms/copy.cc: New testcase. * testsuite/25_algorithms/sort.cc: Same. * testsuite/25_algorithms/heap.cc: Same. * testsuite/25_algorithms/partition.cc: Same. * testsuite/25_algorithms/binary_search.cc: Same. * testsuite/26_numerics/sum_diff.cc: Ditto. From-SVN: r44117
2001-07-18 19:09:02 +02:00
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__
// Extensions: __uninitialized_default, __uninitialized_default_n,
// __uninitialized_default_a, __uninitialized_default_n_a.
template<bool _TrivialValueType>
struct __uninitialized_default_1
{
template<typename _ForwardIterator>
static void
__uninit_default(_ForwardIterator __first, _ForwardIterator __last)
{
_ForwardIterator __cur = __first;
__try
{
for (; __cur != __last; ++__cur)
std::_Construct(std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_default_1<true>
{
template<typename _ForwardIterator>
static void
__uninit_default(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::fill(__first, __last, _ValueType());
}
};
template<bool _TrivialValueType>
struct __uninitialized_default_n_1
{
template<typename _ForwardIterator, typename _Size>
static void
__uninit_default_n(_ForwardIterator __first, _Size __n)
{
_ForwardIterator __cur = __first;
__try
{
for (; __n > 0; --__n, ++__cur)
std::_Construct(std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_default_n_1<true>
{
template<typename _ForwardIterator, typename _Size>
static void
__uninit_default_n(_ForwardIterator __first, _Size __n)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::fill_n(__first, __n, _ValueType());
}
};
// __uninitialized_default
// Fills [first, last) with std::distance(first, last) default
// constructed value_types(s).
template<typename _ForwardIterator>
inline void
__uninitialized_default(_ForwardIterator __first,
_ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::__uninitialized_default_1<__is_trivial(_ValueType)>::
__uninit_default(__first, __last);
}
// __uninitialized_default_n
// Fills [first, first + n) with n default constructed value_type(s).
template<typename _ForwardIterator, typename _Size>
inline void
__uninitialized_default_n(_ForwardIterator __first, _Size __n)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::__uninitialized_default_n_1<__is_trivial(_ValueType)>::
__uninit_default_n(__first, __n);
}
// __uninitialized_default_a
// Fills [first, last) with std::distance(first, last) default
// constructed value_types(s), constructed with the allocator alloc.
template<typename _ForwardIterator, typename _Allocator>
void
__uninitialized_default_a(_ForwardIterator __first,
_ForwardIterator __last,
_Allocator& __alloc)
{
_ForwardIterator __cur = __first;
__try
{
for (; __cur != __last; ++__cur)
__alloc.construct(std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Tp>
inline void
__uninitialized_default_a(_ForwardIterator __first,
_ForwardIterator __last,
allocator<_Tp>&)
{ std::__uninitialized_default(__first, __last); }
// __uninitialized_default_n_a
// Fills [first, first + n) with n default constructed value_types(s),
// constructed with the allocator alloc.
template<typename _ForwardIterator, typename _Size, typename _Allocator>
void
__uninitialized_default_n_a(_ForwardIterator __first, _Size __n,
_Allocator& __alloc)
{
_ForwardIterator __cur = __first;
__try
{
for (; __n > 0; --__n, ++__cur)
__alloc.construct(std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Size, typename _Tp>
inline void
__uninitialized_default_n_a(_ForwardIterator __first, _Size __n,
allocator<_Tp>&)
{ std::__uninitialized_default_n(__first, __n); }
template<typename _InputIterator, typename _Size,
typename _ForwardIterator>
_ForwardIterator
__uninitialized_copy_n(_InputIterator __first, _Size __n,
_ForwardIterator __result, input_iterator_tag)
{
_ForwardIterator __cur = __result;
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__try
{
for (; __n > 0; --__n, ++__first, ++__cur)
std::_Construct(std::__addressof(*__cur), *__first);
return __cur;
}
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
}
}
template<typename _RandomAccessIterator, typename _Size,
typename _ForwardIterator>
inline _ForwardIterator
__uninitialized_copy_n(_RandomAccessIterator __first, _Size __n,
_ForwardIterator __result,
random_access_iterator_tag)
{ return std::uninitialized_copy(__first, __first + __n, __result); }
/**
* @brief Copies the range [first,first+n) into result.
* @param first An input iterator.
* @param n The number of elements to copy.
* @param result An output iterator.
* @return result + n
*
* Like copy_n(), but does not require an initialized output range.
*/
template<typename _InputIterator, typename _Size, typename _ForwardIterator>
inline _ForwardIterator
uninitialized_copy_n(_InputIterator __first, _Size __n,
_ForwardIterator __result)
{ return std::__uninitialized_copy_n(__first, __n, __result,
std::__iterator_category(__first)); }
#endif
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/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/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.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_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_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/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_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/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_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/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _STL_UNINITIALIZED_H */