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

563 lines
17 KiB
C
Raw Normal View History

user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
// shared_ptr and weak_ptr implementation -*- C++ -*-
hashtable.h: Fold in include/tr1_impl/hashtable.h contents. 2010-02-10 Paolo Carlini <paolo.carlini@oracle.com> * include/tr1/hashtable.h: Fold in include/tr1_impl/hashtable.h contents. * include/tr1_impl/hashtable.h: Remove. * include/tr1_impl/hashtable_policy.h: Move and rename... * include/tr1/hashtable_policy.h: ... here. * include/tr1_impl/unordered_map: Move and rename... * include/tr1/unordered_map.h: ... here. * include/tr1_impl/unordered_set: Move and rename... * include/tr1/unordered_set.h: ... here. * include/tr1_impl/unordered_map: Move and rename... * include/tr1/unordered_map.h: ... here. * include/tr1/unordered_map: Adjust. * include/tr1/unordered_set: Likewise. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * include/std/c++0x_warning.h: Move... * include/bits/c++0x_warning.h: ... here. * include/debug/unordered_map: Adjust. * include/debug/unordered_set: Likewise. * include/std/tuple: Likewise. * include/std/system_error: Likewise. * include/std/forward_list: Likewise. * include/std/thread: Likewise. * include/std/type_traits: Likewise. * include/std/future: Likewise. * include/std/regex: Likewise. * include/std/atomic: Likewise. * include/std/ratio: Likewise. * include/std/random: Likewise. * include/std/unordered_map: Likewise. * include/std/chrono: Likewise.: Likewise. * include/std/condition_variable: Likewise. * include/std/mutex: Likewise. * include/std/unordered_set: Likewise. * include/std/array: Likewise. * include/profile/unordered_map: Likewise. * include/profile/unordered_set: Likewise. * include/c_global/cinttypes: Likewise. * include/c_global/ctgmath: Likewise. * include/c_global/cfenv: Likewise. * include/c_global/cstdint: Likewise. * include/c_global/cstdbool: Likewise. * include/c_global/ccomplex: Likewise. * include/bits/shared_ptr.h: Do not include <bits/c++0x_warning.h> at all, the file is not meant to be included by the users. * include/bits/functional_hash.h: Likewise. * include/bits/unique_ptr.h: Likewise. * include/bits/forward_list.h: Likewise. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-* line numbers. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Likewise. * 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/20_util/unique_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/unique_ptr/assign/assign_neg.cc: Likewise. From-SVN: r156667
2010-02-10 20:14:33 +01:00
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later 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.
// 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/>.
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
// GCC Note: Based on files from version 1.32.0 of the Boost library.
// shared_count.hpp
// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
// shared_ptr.hpp
// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
// Copyright (C) 2001, 2002, 2003 Peter Dimov
// weak_ptr.hpp
// Copyright (C) 2001, 2002, 2003 Peter Dimov
// enable_shared_from_this.hpp
// Copyright (C) 2002 Peter Dimov
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
/** @file bits/shared_ptr.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _SHARED_PTR_H
#define _SHARED_PTR_H 1
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
#include <bits/shared_ptr_base.h>
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
_GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @addtogroup pointer_abstractions
* @{
*/
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/// 2.2.3.7 shared_ptr I/O
template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
inline std::basic_ostream<_Ch, _Tr>&
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
operator<<(std::basic_ostream<_Ch, _Tr>& __os,
const __shared_ptr<_Tp, _Lp>& __p)
{
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
__os << __p.get();
return __os;
}
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/// 2.2.3.10 shared_ptr get_deleter (experimental)
template<typename _Del, typename _Tp, _Lock_policy _Lp>
inline _Del*
get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
{
#ifdef __GXX_RTTI
return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del)));
#else
return 0;
#endif
}
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief A smart pointer with reference-counted copy semantics.
*
* The object pointed to is deleted when the last shared_ptr pointing to
* it is destroyed or reset.
*/
template<typename _Tp>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
class shared_ptr : public __shared_ptr<_Tp>
{
public:
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Construct an empty %shared_ptr.
* @post use_count()==0 && get()==0
*/
constexpr shared_ptr()
: __shared_ptr<_Tp>() { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Construct a %shared_ptr that owns the pointer @a __p.
* @param __p A pointer that is convertible to element_type*.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @c delete @a __p is called.
*/
template<typename _Tp1>
explicit shared_ptr(_Tp1* __p)
: __shared_ptr<_Tp>(__p) { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Construct a %shared_ptr that owns the pointer @a __p
* and the deleter @a __d.
* @param __p A pointer.
* @param __d A deleter.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @a __d(__p) is called.
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
*
* Requirements: _Deleter's copy constructor and destructor must
* not throw
*
* __shared_ptr will release __p by calling __d(__p)
*/
template<typename _Tp1, typename _Deleter>
shared_ptr(_Tp1* __p, _Deleter __d)
: __shared_ptr<_Tp>(__p, __d) { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Construct a %shared_ptr that owns a null pointer
* and the deleter @a __d.
* @param __p A null pointer constant.
* @param __d A deleter.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @a __d(__p) is called.
*
* Requirements: _Deleter's copy constructor and destructor must
* not throw
*
* The last owner will call __d(__p)
*/
template<typename _Deleter>
shared_ptr(nullptr_t __p, _Deleter __d)
: __shared_ptr<_Tp>(__p, __d) { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Construct a %shared_ptr that owns the pointer @a __p
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
* and the deleter @a __d.
* @param __p A pointer.
* @param __d A deleter.
* @param __a An allocator.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @a __d(__p) is called.
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
*
* Requirements: _Deleter's copy constructor and destructor must
* not throw _Alloc's copy constructor and destructor must not
* throw.
*
* __shared_ptr will release __p by calling __d(__p)
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
*/
template<typename _Tp1, typename _Deleter, typename _Alloc>
shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
: __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Construct a %shared_ptr that owns a null pointer
* and the deleter @a __d.
* @param __p A null pointer constant.
* @param __d A deleter.
* @param __a An allocator.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @a __d(__p) is called.
*
* Requirements: _Deleter's copy constructor and destructor must
* not throw _Alloc's copy constructor and destructor must not
* throw.
*
* The last owner will call __d(__p)
*/
template<typename _Deleter, typename _Alloc>
shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
: __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
// Aliasing constructor
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Constructs a %shared_ptr instance that stores @a __p
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
* and shares ownership with @a __r.
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
* @param __r A %shared_ptr.
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
* @param __p A pointer that will remain valid while @a *__r is valid.
* @post get() == __p && use_count() == __r.use_count()
*
* This can be used to construct a @c shared_ptr to a sub-object
* of an object managed by an existing @c shared_ptr.
*
* @code
* shared_ptr< pair<int,int> > pii(new pair<int,int>());
* shared_ptr<int> pi(pii, &pii->first);
* assert(pii.use_count() == 2);
* @endcode
*/
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p)
: __shared_ptr<_Tp>(__r, __p) { }
/**
* @brief If @a __r is empty, constructs an empty %shared_ptr;
* otherwise construct a %shared_ptr that shares ownership
* with @a __r.
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
* @param __r A %shared_ptr.
* @post get() == __r.get() && use_count() == __r.use_count()
*/
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
shared_ptr(const shared_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Move-constructs a %shared_ptr instance from @a __r.
* @param __r A %shared_ptr rvalue.
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
* @post *this contains the old value of @a __r, @a __r is empty.
*/
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr(shared_ptr&& __r)
: __shared_ptr<_Tp>(std::move(__r)) { }
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Move-constructs a %shared_ptr instance from @a __r.
* @param __r A %shared_ptr rvalue.
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
* @post *this contains the old value of @a __r, @a __r is empty.
*/
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr(shared_ptr<_Tp1>&& __r)
: __shared_ptr<_Tp>(std::move(__r)) { }
/**
* @brief Constructs a %shared_ptr that shares ownership with @a __r
* and stores a copy of the pointer stored in @a __r.
* @param __r A weak_ptr.
* @post use_count() == __r.use_count()
* @throw bad_weak_ptr when __r.expired(),
* in which case the constructor has no effect.
*/
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
explicit shared_ptr(const weak_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { }
#if _GLIBCXX_DEPRECATED
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr(std::auto_ptr<_Tp1>&& __r)
: __shared_ptr<_Tp>(std::move(__r)) { }
#endif
template<typename _Tp1, typename _Del>
shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
: __shared_ptr<_Tp>(std::move(__r)) { }
/**
* @brief Construct an empty %shared_ptr.
* @param __p A null pointer constant.
* @post use_count() == 0 && get() == nullptr
*/
constexpr shared_ptr(nullptr_t __p)
: __shared_ptr<_Tp>(__p) { }
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr&
operator=(const shared_ptr<_Tp1>& __r) // never throws
{
this->__shared_ptr<_Tp>::operator=(__r);
return *this;
}
#if _GLIBCXX_DEPRECATED
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr&
operator=(std::auto_ptr<_Tp1>&& __r)
{
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
}
#endif
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
shared_ptr&
operator=(shared_ptr&& __r)
{
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
}
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
template<class _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr&
operator=(shared_ptr<_Tp1>&& __r)
{
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
}
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
template<typename _Tp1, typename _Del>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
shared_ptr&
operator=(std::unique_ptr<_Tp1, _Del>&& __r)
{
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
}
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
private:
// This constructor is non-standard, it is used by allocate_shared.
template<typename _Alloc, typename... _Args>
shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
_Args&&... __args)
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
: __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
{ }
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
template<typename _Tp1, typename _Alloc, typename... _Args>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
friend shared_ptr<_Tp1>
allocate_shared(const _Alloc& __a, _Args&&... __args);
};
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
// 20.8.13.2.7 shared_ptr comparisons
template<typename _Tp1, typename _Tp2>
inline bool
operator==(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
{ return __a.get() == __b.get(); }
template<typename _Tp>
inline bool
operator==(const shared_ptr<_Tp>& __a, nullptr_t)
{ return __a.get() == nullptr; }
template<typename _Tp>
inline bool
operator==(nullptr_t, const shared_ptr<_Tp>& __b)
{ return nullptr == __b.get(); }
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
template<typename _Tp1, typename _Tp2>
inline bool
operator!=(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
{ return __a.get() != __b.get(); }
template<typename _Tp>
inline bool
operator!=(const shared_ptr<_Tp>& __a, nullptr_t)
{ return __a.get() != nullptr; }
template<typename _Tp>
inline bool
operator!=(nullptr_t, const shared_ptr<_Tp>& __b)
{ return nullptr != __b.get(); }
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
template<typename _Tp1, typename _Tp2>
inline bool
operator<(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
{ return __a.get() < __b.get(); }
template<typename _Tp>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>>
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
{ };
// 20.8.13.2.9 shared_ptr specialized algorithms.
template<typename _Tp>
inline void
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b)
{ __a.swap(__b); }
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
// 20.8.13.2.10 shared_ptr casts.
template<typename _Tp, typename _Tp1>
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
inline shared_ptr<_Tp>
static_pointer_cast(const shared_ptr<_Tp1>& __r)
{ return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); }
template<typename _Tp, typename _Tp1>
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
inline shared_ptr<_Tp>
const_pointer_cast(const shared_ptr<_Tp1>& __r)
{ return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); }
template<typename _Tp, typename _Tp1>
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
inline shared_ptr<_Tp>
dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
{
if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
return shared_ptr<_Tp>(__r, __p);
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
return shared_ptr<_Tp>();
}
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief A smart pointer with weak semantics.
*
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
* With forwarding constructors and assignment operators.
*/
template<typename _Tp>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
class weak_ptr : public __weak_ptr<_Tp>
{
public:
constexpr weak_ptr()
: __weak_ptr<_Tp>() { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
weak_ptr(const weak_ptr<_Tp1>& __r)
: __weak_ptr<_Tp>(__r) { }
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
weak_ptr(const shared_ptr<_Tp1>& __r)
: __weak_ptr<_Tp>(__r) { }
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
weak_ptr&
operator=(const weak_ptr<_Tp1>& __r) // never throws
{
this->__weak_ptr<_Tp>::operator=(__r);
return *this;
}
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
weak_ptr&
operator=(const shared_ptr<_Tp1>& __r) // never throws
{
this->__weak_ptr<_Tp>::operator=(__r);
return *this;
}
shared_ptr<_Tp>
lock() const // never throws
{
#ifdef __GTHREADS
if (this->expired())
return shared_ptr<_Tp>();
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
{
return shared_ptr<_Tp>(*this);
}
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(const bad_weak_ptr&)
{
return shared_ptr<_Tp>();
}
#else
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
return this->expired() ? shared_ptr<_Tp>() : shared_ptr<_Tp>(*this);
#endif
}
};
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
// 20.8.13.3.7 weak_ptr specialized algorithms.
template<typename _Tp>
inline void
swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b)
{ __a.swap(__b); }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/// Primary template owner_less
template<typename _Tp>
struct owner_less;
/// Partial specialization of owner_less for shared_ptr.
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
template<typename _Tp>
struct owner_less<shared_ptr<_Tp>>
: public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>>
{ };
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/// Partial specialization of owner_less for weak_ptr.
shared_ptr.h: Update comparisons to match WP. 2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/shared_ptr.h: Update comparisons to match WP. (_Sp_counted_ptr): Make copy and assignment members deleted. (_Sp_counted_deleter): Remove private copy and assignment members. (__shared_count::_M_less,__weak_count::_M_less,operator<): Replace friend operator< with overloaded _M_less member functions to allow comparison with either shared_count or weak_count. (__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with... (__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads for ownership-based ordering. (operator<(__shared_ptr,__shared_ptr)): Compare stored pointers, make non-friend. (operator==(__shared_ptr,__shared_ptr)): Make non-friend. (operator!=(__shared_ptr,__shared_ptr)): Likewise. (less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call pointer specialization. (__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>, weak_ptr::operator>=): Remove operator< and delete all comparisons. (_Sp_owner_less,owner_less): Predicate for ownership-based ordering. (operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr. (operator==(shared_ptr,shared_ptr): Likewise. (operator!=(shared_ptr,shared_ptr): Likewise. (swap(shared_ptr,shared_ptr)): Fix parameter types. (swap(weak_ptr,weak_ptr)): Add missing overload. * testsuite/20_util/owner_less/cmp.cc: New. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops. * testsuite/20_util/shared_ptr/comparison/less.cc: New. * testsuite/20_util/shared_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/observers/owner_before.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New. From-SVN: r141512
2008-11-01 12:29:06 +01:00
template<typename _Tp>
struct owner_less<weak_ptr<_Tp>>
: public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>>
{ };
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
* @brief Base class allowing use of member function shared_from_this.
*/
template<typename _Tp>
class enable_shared_from_this
{
protected:
constexpr enable_shared_from_this() { }
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
enable_shared_from_this(const enable_shared_from_this&) { }
enable_shared_from_this&
operator=(const enable_shared_from_this&)
{ return *this; }
~enable_shared_from_this() { }
public:
shared_ptr<_Tp>
shared_from_this()
{ return shared_ptr<_Tp>(this->_M_weak_this); }
shared_ptr<const _Tp>
shared_from_this() const
{ return shared_ptr<const _Tp>(this->_M_weak_this); }
private:
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
void
_M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const
{ _M_weak_this._M_assign(__p, __n); }
template<typename _Tp1>
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
friend void
__enable_shared_from_this_helper(const __shared_count<>& __pn,
const enable_shared_from_this* __pe,
const _Tp1* __px)
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
{
if (__pe != 0)
__pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
}
mutable weak_ptr<_Tp> _M_weak_this;
};
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Create an object that is owned by a shared_ptr.
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
* @param __a An allocator.
* @param __args Arguments for the @a _Tp object's constructor.
* @return A shared_ptr that owns the newly created object.
* @throw An exception thrown from @a _Alloc::allocate or from the
* constructor of @a _Tp.
*
* A copy of @a __a will be used to allocate memory for the shared_ptr
* and the new object.
*/
template<typename _Tp, typename _Alloc, typename... _Args>
inline shared_ptr<_Tp>
allocate_shared(const _Alloc& __a, _Args&&... __args)
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
{
return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a,
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
std::forward<_Args>(__args)...);
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
}
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
/**
* @brief Create an object that is owned by a shared_ptr.
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
* @param __args Arguments for the @a _Tp object's constructor.
* @return A shared_ptr that owns the newly created object.
* @throw std::bad_alloc, or an exception thrown from the
* constructor of @a _Tp.
*/
template<typename _Tp, typename... _Args>
inline shared_ptr<_Tp>
make_shared(_Args&&... __args)
{
typedef typename std::remove_const<_Tp>::type _Tp_nc;
return allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
user.cfg.in: Adjust includes. 2009-11-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Adjust includes. * doc/doxygen/doxygroups.cc: Move group markup. * include/tr1_impl/regex: Change " to '. Add group markup. * include/std/utility: Same. * include/std/type_traits: Same. * include/std/streambuf: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/sstream: Same. * include/profile/impl/profiler_state.h: Same. * include/profile/impl/profiler_hashtable_size.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/streambuf_iterator.h: Same. * libsupc++/exception: Same. * libsupc++/cxxabi.h: Same. * include/tr1_impl/type_traits: Same. * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f. * include/parallel/list_partition.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/base.h: Same. * include/parallel/equally_split.h: Same. * include/parallel/random_shuffle.h: Same. * include/parallel/balanced_quicksort.h: Same. * include/parallel/merge.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/compatibility.h: Same. * include/parallel/queue.h: Same. * include/parallel/checkers.h: Same. * include/parallel/random_number.h: Same. * include/c_global/csignal: Change # to \#. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cstdatomic: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/std/memory: Only dance around boost_sp_counted_base.h. * include/tr1_impl/boost_sp_counted_base.h: Add markup. * include/tr1/shared_ptr.h: Strip markup. * include/bits/shared_ptr.h: Move base types... * include/bits/shared_ptr_base.h: ...here. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * configure: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r153980
2009-11-06 23:15:17 +01:00
std::forward<_Args>(__args)...);
boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. 2007-12-15 Jonathan Wakely <jwakely-gcc@gmail.com> * include/tr1_impl/boost_shared_ptr.h: Add support for allocators, aliasing, make_shared and rvalue-references. Move __shared_count and _Sp_counted_* classes to new headers. * include/tr1_impl/boost_sp_counted_base.h: New. * include/bits/boost_sp_shared_count.h: New. * include/tr1/boost_sp_shared_count.h: New. * include/std/memory, include/tr1/memory: Include new headers. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. * docs/html/documentation.html: Link to shared_ptr notes. * docs/html/20_util/shared_ptr.html: New. * docs/html/17_intro/c++0x_status.html: Update shared_ptr status. * testsuite/20_util/shared_ptr/cons/alias.cc: New. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/casts/1.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 1.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/ 2.cc: Likewise. * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc: Remove. * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc: Remove. From-SVN: r130977
2007-12-15 23:28:29 +01:00
}
/// std::hash specialization for shared_ptr.
template<typename _Tp>
struct hash<shared_ptr<_Tp>>
: public std::unary_function<shared_ptr<_Tp>, size_t>
{
size_t
operator()(const shared_ptr<_Tp>& __s) const
{ return std::hash<_Tp*>()(__s.get()); }
};
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
// @} group pointer_abstractions
_GLIBCXX_END_NAMESPACE
#endif // _SHARED_PTR_H