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

187 lines
5.7 KiB
C
Raw Normal View History

rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. 2005-11-18 Paolo Carlini <pcarlini@suse.de> * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. * include/ext/rc_string_base.h (__rc_string_base<>::_S_empty_rep()): Just use a static member. (__rc_string_base<>::__rc_string_base(), _S_construct): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Use anonymous union together with _CharT to fix alignment issues, rebind to _Rep and rename _Raw_alloc to _Rep_alloc_type. (__rc_string_base<>::_Rep::_S_create, _M_destroy): Adjust consistently. * include/ext/vstring_util.h (__is_null_p): Move inside struct __vstring_utility as static _S_is_null_pointer. * include/ext/sso_string.h (__sso_string_base<>::_M_construct(std::forward_iterator_tag): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_S_construct(std::forward_iterator_tag): Likewise. Implement Option 3 of DR 431 for ext/vstring - both available bases. * include/bits/cpp_type_traits.h (struct __is_empty): Add. * include/ext/vstring.h (__versa_string<>::swap): Delegate to this->_M_swap. * include/ext/vstring.tcc (__versa_string<>::swap): Remove. * include/ext/vstring_util.h (struct __vstring_utility<>): Add struct _Alloc_hider<>, augmented of allocator swapping facility, specialized to nop for empty allocators. * include/ext/rc_string_base.h (__rc_string_base<>::_M_swap): Use it. (__rc_string_base<>::_M_is_leaked, _M_set_sharable): Change to private. * include/ext/sso_string_base.h (__sso_string_base<>::_M_swap): Likewise. (__sso_string_base<>::_M_is_leaked, _M_set_sharable): Remove, unused. * include/ext/rc_string_base.h (__rc_string_base<>::_M_data(_CharT*): Return void. * include/ext/sso_string_base.h (__sso_string_base<>::_M_data(_CharT*): Likewise. From-SVN: r107176
2005-11-18 12:50:22 +01:00
// Versatile string utility -*- C++ -*-
2022-01-03 10:42:10 +01:00
// Copyright (C) 2005-2022 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/>.
/** @file ext/vstring_util.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{ext/vstring.h}
*/
#ifndef _VSTRING_UTIL_H
#define _VSTRING_UTIL_H 1
#pragma GCC system_header
#include <ext/vstring_fwd.h>
#include <debug/debug.h>
#include <bits/stl_function.h> // For less
#include <bits/functexcept.h>
PR libstdc++/28277 (partial: vstring bits) 2007-04-10 Paolo Carlini <pcarlini@suse.de> PR libstdc++/28277 (partial: vstring bits) * include/bits/ostream_insert.h: New. * include/Makefile.am: Add. * include/ext/vstring.h (operator<<(basic_ostream<>&, const __versa_string<>&): Forward to __ostream_insert. * include/bits/basic_string.h (operator<<(basic_ostream<>&, const string<>&)): Likewise. * include/std/ostream (operator<<(basic_ostream<>&, _CharT), operator<<(basic_ostream<char,>&, char), operator<<(basic_ostream<>&, const _CharT*), operator<<(basic_ostream<char,>&, const char*)): Likewise. * include/ext/vstring.tcc (operator<<(basic_ostream<>&, const __versa_string<>&)): Remove. (class basic_ostream): Remove friend declarations. (basic_ostream<>::_M_write(char_type, streamsize), _M_insert(const char_type*, streamsize)): Remove. * include/bits/ostream.tcc (_M_insert(const char_type*, streamsize)): Remove definition. (operator<<(basic_ostream<>&, const char*)): Use __ostream_insert. * config/abi/pre/gnu.ver: Adjust. * src/ostream-inst.cc: Add __ostream_insert instantiations. * include/bits/locale_facets.h (__pad<>::_S_pad): Remove __num parameter. * include/bits/locale_facets.tcc (__pad<>::_S_pad): Adjust. (num_put<>::_M_pad(_CharT, streamsize, ios_base&, _CharT*, const _CharT*, int&)): Likewise. * include/Makefile.in: Rebuild. * testsuite/ext/vstring/inserters_extractors/char/28277.cc: New. * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: New. * include/ext/vstring_util.h: Do not include the whole <locale>. * include/ext/vstring.tcc (operator>>(basic_istream<>&, __versa_string<>&, getline(basic_istream<>&, __versa_string<>&, _CharT)): Tweak to refer to ios_base as a base of istream; do not refer to non-standard types of istream. * include/bits/istream.tcc (operator>>(basic_istream<>&, _CharT*), ws(basic_istream<>&)): Do not refer to non-standard types of istream. * include/std/bitset (operator>>(std::basic_istream<>&, bitset<>&)): Avoid using basic_streambuf<>*. * include/bits/istream.tcc (operator>>(basic_istream<>&, basic_string<>&), getline(basic_istream<>&, basic_string<>&, _CharT)): Move... * include/bits/basic_string.tcc: ... here; tweak to refer to ios_base as a base of istream; do not refer to non-standard types of istream. * include/std/string: Tweak includes. * include/ext/type_traits.h (__is_null_pointer): Add. * include/ext/rc_string_base.h: Use it. * include/ext/sso_string_base.h: Likewise. * include/bits/basic_string.tcc (__is_null_pointer): Remove, use the above. * include/ext/vstring_util.h (__vstring_utility<>::_S_is_null_pointer): Remove. From-SVN: r123692
2007-04-10 12:38:50 +02:00
#include <bits/localefwd.h>
#include <bits/ostream_insert.h>
Fixes for --disable-libstdcxx-pch. 2007-10-05 Benjamin Kosnik <bkoz@redhat.com> Fixes for --disable-libstdcxx-pch. * include/ext/rc_string_base.h: Include stl_iterator_base_funcs.h. * include/ext/vstring_util.h: Include stl_iterator.h and numeric_traits.h. * include/tr1/functional: Include new. * testsuite/util/testsuite_api.h: Include exception. * testsuite/lib/libstdc++.exp (libstdc++_init): Set PCH_CXXFLAGS via cxxpchflags. * testsuite/25_algorithms/binary_search/requirements/ explicit_instantiation/2.cc: Same.: Fix includes. * testsuite/25_algorithms/count_if/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/equal_range/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/find_end/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/find_first_of/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/find_if/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/for_each/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/includes/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/inplace_merge/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/lexicographical_compare/ requirements/explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/lower_bound/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/make_heap/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/max_element/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/max/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/merge/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/min_element/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/min/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/next_permutation/ requirements/explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/nth_element/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/partial_sort_copy/ requirements/explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/partial_sort/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/partition/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/pop_heap/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/prev_permutation/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/push_heap/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/random_shuffle/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/remove_copy_if/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/remove_if/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/replace_copy_if/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/replace_if/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/search_n/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/search/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/set_difference/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/set_intersection/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/set_symmetric_difference/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/set_union/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/sort_heap/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/sort/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/stable_partition/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/stable_sort/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/transform/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/unique_copy/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/unique/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/upper_bound/requirements/ explicit_instantiation/2.cc: Same. * testsuite/25_algorithms/remove/requirements/ explicit_instantiation/pod.cc: Provide a hint to the compiler. From-SVN: r129049
2007-10-06 05:06:37 +02:00
#include <bits/stl_iterator.h>
#include <ext/numeric_traits.h>
Remove redundant std::allocator members for C++20 C++20 removes a number of std::allocator members that have correct defaults provided by std::allocator_traits, so aren't needed. Several extensions including __gnu_cxx::hash_map and tr1 containers are no longer usable with std::allocator in C++20 mode. They need to be updated to use __gnu_cxx::__alloc_traits in a follow-up patch. * include/bits/alloc_traits.h (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20. (allocator_traits<allocator<T>>::construct): Perform placement new directly for C++20, instead of calling allocator<T>::construct. (allocator_traits<allocator<T>>::destroy): Call destructor directly for C++20, instead of calling allocator<T>::destroy. (allocator_traits<allocator<T>>::max_size): Return value directly for C++20, instead of calling std::allocator<T>::max_size(). (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not define for C++17 and up. (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr for C++17 and up, instead of tag dispatching. * include/bits/allocator.h (allocator<void>): Remove for C++20. (allocator::pointer, allocator::const_pointer, allocator::reference) (allocator::const_reference, allocator::rebind): Remove for C++20. * include/bits/basic_string.h (basic_string): Use __alloc_traits to rebind allocator. * include/bits/memoryfwd.h (allocator<void>): Remove for C++20. * include/ext/debug_allocator.h: Use __alloc_traits for rebinding. * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator) (malloc_allocator::pointer, malloc_allocator::const_pointer) (malloc_allocator::reference, malloc_allocator::const_reference) (malloc_allocator::rebind, malloc_allocator::max_size) (malloc_allocator::construct, malloc_allocator::destroy): Do not define for C++20. (malloc_allocator::_M_max_size): Define new function. * include/ext/new_allocator.h (new_allocator::~new_allocator) (new_allocator::pointer, new_allocator::const_pointer) (new_allocator::reference, new_allocator::const_reference) (new_allocator::rebind, new_allocator::max_size) (new_allocator::construct, new_allocator::destroy): Do not define for C++20. (new_allocator::_M_max_size): Define new function. * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use __alloc_traits to rebind allocator. * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise. (rope::rope(CharT, const allocator_type&)): Use __alloc_traits to construct character. * include/ext/slist (_Slist_base): Use __alloc_traits to rebind allocator. * include/ext/sso_string_base.h (__sso_string_base::_M_max_size): Use __alloc_traits. * include/ext/throw_allocator.h (throw_allocator): Do not use optional members of std::allocator, use __alloc_traits members instead. * include/ext/vstring.h (__versa_string): Use __alloc_traits. * include/ext/vstring_util.h (__vstring_utility): Likewise. * include/std/memory: Include <bits/alloc_traits.h>. * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size. * testsuite/20_util/allocator/rebind_c++20.cc: New test. * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check for pointer, const_pointer, reference, const_reference or rebind in C++20. * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test. * testsuite/23_containers/deque/capacity/29134.cc: Use __gnu_test::max_size. * testsuite/23_containers/forward_list/capacity/1.cc: Likewise. * testsuite/23_containers/list/capacity/29134.cc: Likewise. * testsuite/23_containers/map/capacity/29134.cc: Likewise. * testsuite/23_containers/multimap/capacity/29134.cc: Likewise. * testsuite/23_containers/multiset/capacity/29134.cc: Likewise. * testsuite/23_containers/set/capacity/29134.cc: Likewise. * testsuite/23_containers/vector/capacity/29134.cc: Likewise. * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run test for C++20. * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size. * testsuite/util/replacement_memory_operators.h: Do not assume Alloc::pointer exists. * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define helper to call max_size for any allocator. From-SVN: r277300
2019-10-22 23:48:39 +02:00
#include <ext/alloc_traits.h>
#include <bits/move.h>
[multiple changes] 2010-07-27 Paolo Carlini <paolo.carlini@oracle.com> * include/ext/vstring_util.h: Include bits/range_access.h. * testsuite/ext/vstring/range_access.cc: New test. 2010-07-27 Ed Smith-Rowland <3dw4rd@verizon.net> * include/bits/range_access.h: New. * include/Makefile.in: Add bits/range_access.h. * include/Makefile.am: Regenerate. * include/std/array: Include bits/range_access.h. * include/std/deque: Ditto. * include/std/forward_list: Ditto. * include/std/iterator: Ditto. * include/std/list: Ditto. * include/std/map: Ditto. * include/std/regex: Ditto. * include/std/set: Ditto. * include/std/string: Ditto. * include/std/unordered_map: Ditto. * include/std/unordered_set: Ditto. * include/std/vector: Ditto. * include/std/valarray: Add begin() and end(). * libsupc++/initializer_list: Ditto. * include/tr1_impl/utility: Add begin() and end(). * include/std/tuple: Ditto. * testsuite/24_iterators/headers/iterator/range_access.cc: New test. * testsuite/24_iterators/range_access.cc: Ditto. * testsuite/28_regex/range_access.cc: Ditto. * testsuite/18_support/initializer_list/range_access.cc: Ditto. * testsuite/21_strings/basic_string/range_access.cc: Ditto. * testsuite/26_numerics/valarray/range_access.cc: Ditto. * testsuite/23_containers/unordered_map/range_access.cc: Ditto. * testsuite/23_containers/multimap/range_access.cc: Ditto. * testsuite/23_containers/set/range_access.cc: Ditto. * testsuite/23_containers/unordered_multimap/range_access.cc: Ditto. * testsuite/23_containers/forward_list/range_access.cc: Ditto. * testsuite/23_containers/unordered_set/range_access.cc: Ditto. * testsuite/23_containers/vector/range_access.cc: Ditto. * testsuite/23_containers/deque/range_access.cc: Ditto. * testsuite/23_containers/multiset/range_access.cc: Ditto. * testsuite/23_containers/list/range_access.cc: Ditto. * testsuite/23_containers/unordered_multiset/range_access.cc: Ditto. * testsuite/23_containers/map/range_access.cc: Ditto. * testsuite/23_containers/array/range_access.cc: Ditto. * testsuite/20_util/tuple/range_access.cc: Ditto. * testsuite/20_util/pair/range_access.cc: Ditto. From-SVN: r162578
2010-07-27 19:27:06 +02:00
#include <bits/range_access.h>
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
template<typename _CharT, typename _Traits, typename _Alloc>
struct __vstring_utility
{
Remove redundant std::allocator members for C++20 C++20 removes a number of std::allocator members that have correct defaults provided by std::allocator_traits, so aren't needed. Several extensions including __gnu_cxx::hash_map and tr1 containers are no longer usable with std::allocator in C++20 mode. They need to be updated to use __gnu_cxx::__alloc_traits in a follow-up patch. * include/bits/alloc_traits.h (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20. (allocator_traits<allocator<T>>::construct): Perform placement new directly for C++20, instead of calling allocator<T>::construct. (allocator_traits<allocator<T>>::destroy): Call destructor directly for C++20, instead of calling allocator<T>::destroy. (allocator_traits<allocator<T>>::max_size): Return value directly for C++20, instead of calling std::allocator<T>::max_size(). (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not define for C++17 and up. (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr for C++17 and up, instead of tag dispatching. * include/bits/allocator.h (allocator<void>): Remove for C++20. (allocator::pointer, allocator::const_pointer, allocator::reference) (allocator::const_reference, allocator::rebind): Remove for C++20. * include/bits/basic_string.h (basic_string): Use __alloc_traits to rebind allocator. * include/bits/memoryfwd.h (allocator<void>): Remove for C++20. * include/ext/debug_allocator.h: Use __alloc_traits for rebinding. * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator) (malloc_allocator::pointer, malloc_allocator::const_pointer) (malloc_allocator::reference, malloc_allocator::const_reference) (malloc_allocator::rebind, malloc_allocator::max_size) (malloc_allocator::construct, malloc_allocator::destroy): Do not define for C++20. (malloc_allocator::_M_max_size): Define new function. * include/ext/new_allocator.h (new_allocator::~new_allocator) (new_allocator::pointer, new_allocator::const_pointer) (new_allocator::reference, new_allocator::const_reference) (new_allocator::rebind, new_allocator::max_size) (new_allocator::construct, new_allocator::destroy): Do not define for C++20. (new_allocator::_M_max_size): Define new function. * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use __alloc_traits to rebind allocator. * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise. (rope::rope(CharT, const allocator_type&)): Use __alloc_traits to construct character. * include/ext/slist (_Slist_base): Use __alloc_traits to rebind allocator. * include/ext/sso_string_base.h (__sso_string_base::_M_max_size): Use __alloc_traits. * include/ext/throw_allocator.h (throw_allocator): Do not use optional members of std::allocator, use __alloc_traits members instead. * include/ext/vstring.h (__versa_string): Use __alloc_traits. * include/ext/vstring_util.h (__vstring_utility): Likewise. * include/std/memory: Include <bits/alloc_traits.h>. * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size. * testsuite/20_util/allocator/rebind_c++20.cc: New test. * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check for pointer, const_pointer, reference, const_reference or rebind in C++20. * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test. * testsuite/23_containers/deque/capacity/29134.cc: Use __gnu_test::max_size. * testsuite/23_containers/forward_list/capacity/1.cc: Likewise. * testsuite/23_containers/list/capacity/29134.cc: Likewise. * testsuite/23_containers/map/capacity/29134.cc: Likewise. * testsuite/23_containers/multimap/capacity/29134.cc: Likewise. * testsuite/23_containers/multiset/capacity/29134.cc: Likewise. * testsuite/23_containers/set/capacity/29134.cc: Likewise. * testsuite/23_containers/vector/capacity/29134.cc: Likewise. * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run test for C++20. * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size. * testsuite/util/replacement_memory_operators.h: Do not assume Alloc::pointer exists. * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define helper to call max_size for any allocator. From-SVN: r277300
2019-10-22 23:48:39 +02:00
typedef typename __alloc_traits<_Alloc>::template rebind<_CharT>::other
_CharT_alloc_type;
typedef __alloc_traits<_CharT_alloc_type> _CharT_alloc_traits;
typedef _Traits traits_type;
typedef typename _Traits::char_type value_type;
typedef typename _CharT_alloc_type::size_type size_type;
typedef typename _CharT_alloc_type::difference_type difference_type;
Remove redundant std::allocator members for C++20 C++20 removes a number of std::allocator members that have correct defaults provided by std::allocator_traits, so aren't needed. Several extensions including __gnu_cxx::hash_map and tr1 containers are no longer usable with std::allocator in C++20 mode. They need to be updated to use __gnu_cxx::__alloc_traits in a follow-up patch. * include/bits/alloc_traits.h (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20. (allocator_traits<allocator<T>>::construct): Perform placement new directly for C++20, instead of calling allocator<T>::construct. (allocator_traits<allocator<T>>::destroy): Call destructor directly for C++20, instead of calling allocator<T>::destroy. (allocator_traits<allocator<T>>::max_size): Return value directly for C++20, instead of calling std::allocator<T>::max_size(). (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not define for C++17 and up. (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr for C++17 and up, instead of tag dispatching. * include/bits/allocator.h (allocator<void>): Remove for C++20. (allocator::pointer, allocator::const_pointer, allocator::reference) (allocator::const_reference, allocator::rebind): Remove for C++20. * include/bits/basic_string.h (basic_string): Use __alloc_traits to rebind allocator. * include/bits/memoryfwd.h (allocator<void>): Remove for C++20. * include/ext/debug_allocator.h: Use __alloc_traits for rebinding. * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator) (malloc_allocator::pointer, malloc_allocator::const_pointer) (malloc_allocator::reference, malloc_allocator::const_reference) (malloc_allocator::rebind, malloc_allocator::max_size) (malloc_allocator::construct, malloc_allocator::destroy): Do not define for C++20. (malloc_allocator::_M_max_size): Define new function. * include/ext/new_allocator.h (new_allocator::~new_allocator) (new_allocator::pointer, new_allocator::const_pointer) (new_allocator::reference, new_allocator::const_reference) (new_allocator::rebind, new_allocator::max_size) (new_allocator::construct, new_allocator::destroy): Do not define for C++20. (new_allocator::_M_max_size): Define new function. * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use __alloc_traits to rebind allocator. * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise. (rope::rope(CharT, const allocator_type&)): Use __alloc_traits to construct character. * include/ext/slist (_Slist_base): Use __alloc_traits to rebind allocator. * include/ext/sso_string_base.h (__sso_string_base::_M_max_size): Use __alloc_traits. * include/ext/throw_allocator.h (throw_allocator): Do not use optional members of std::allocator, use __alloc_traits members instead. * include/ext/vstring.h (__versa_string): Use __alloc_traits. * include/ext/vstring_util.h (__vstring_utility): Likewise. * include/std/memory: Include <bits/alloc_traits.h>. * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size. * testsuite/20_util/allocator/rebind_c++20.cc: New test. * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check for pointer, const_pointer, reference, const_reference or rebind in C++20. * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test. * testsuite/23_containers/deque/capacity/29134.cc: Use __gnu_test::max_size. * testsuite/23_containers/forward_list/capacity/1.cc: Likewise. * testsuite/23_containers/list/capacity/29134.cc: Likewise. * testsuite/23_containers/map/capacity/29134.cc: Likewise. * testsuite/23_containers/multimap/capacity/29134.cc: Likewise. * testsuite/23_containers/multiset/capacity/29134.cc: Likewise. * testsuite/23_containers/set/capacity/29134.cc: Likewise. * testsuite/23_containers/vector/capacity/29134.cc: Likewise. * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run test for C++20. * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size. * testsuite/util/replacement_memory_operators.h: Do not assume Alloc::pointer exists. * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define helper to call max_size for any allocator. From-SVN: r277300
2019-10-22 23:48:39 +02:00
typedef typename _CharT_alloc_traits::pointer pointer;
typedef typename _CharT_alloc_traits::const_pointer const_pointer;
// For __sso_string.
typedef __gnu_cxx::
__normal_iterator<pointer, __gnu_cxx::
__versa_string<_CharT, _Traits, _Alloc,
__sso_string_base> >
__sso_iterator;
typedef __gnu_cxx::
__normal_iterator<const_pointer, __gnu_cxx::
__versa_string<_CharT, _Traits, _Alloc,
__sso_string_base> >
__const_sso_iterator;
// For __rc_string.
typedef __gnu_cxx::
__normal_iterator<pointer, __gnu_cxx::
__versa_string<_CharT, _Traits, _Alloc,
__rc_string_base> >
__rc_iterator;
typedef __gnu_cxx::
__normal_iterator<const_pointer, __gnu_cxx::
__versa_string<_CharT, _Traits, _Alloc,
__rc_string_base> >
__const_rc_iterator;
// NB: When the allocator is empty, deriving from it saves space
sso_string_base.h (__sso_string_base<>::_M_dataplus): Use _CharT_alloc_type as base class. 2006-01-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_dataplus): Use _CharT_alloc_type as base class. (_M_get_allocator, _M_swap, _M_create, _M_destroy): Adjust. * include/ext/vstring.h (get_allocator): Tidy. 2006-01-04 Paolo Carlini <pcarlini@suse.de> Implement Option 3 of DR 431 for all the containers. * include/bits/allocator.h (struct __alloc_swap): Add, swaps allocators, optimized to nothing in case they are empty. * include/bits/stl_deque.h (deque<>::swap): Use it. * include/bits/stl_list.h (list<>::swap): Likewise. * include/bits/stl_tree.h (_Rb_tree<>::swap): Likewise. * include/bits/stl_vector.h (vector<>::swap): Likewise. * include/tr1/hashtable (hashtable<>::swap): Likewise. * include/ext/rc_string_base.h (__rc_string_base<>::_M_swap): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_swap): Likewise. * include/ext/vstring_util.h (__vstring_utility<>::_Alloc_hider): Clean-up (now vstring uses the generic __alloc_swap facility). * include/tr1/unordered_map: Adjust includes. * include/tr1/unordered_set: Likewise. * docs/html/ext/howto.html: Add an entry for DR 431. * testsuite/23_containers/deque/modifiers/swap.cc: Move to... * testsuite/23_containers/deque/modifiers/swap/1.cc: ... here. * testsuite/23_containers/deque/modifiers/swap/2.cc: New. * testsuite/23_containers/deque/modifiers/swap/3.cc: New. * testsuite/23_containers/list/modifiers/swap.cc: Move to... * testsuite/23_containers/list/modifiers/swap/1.cc: ... here. * testsuite/23_containers/list/modifiers/swap/2.cc: New. * testsuite/23_containers/list/modifiers/swap/3.cc: New. * testsuite/23_containers/vector/modifiers/swap.cc: Move to... * testsuite/23_containers/vector/modifiers/swap/1.cc: ... here. * testsuite/23_containers/vector/modifiers/swap/2.cc: New. * testsuite/23_containers/vector/modifiers/swap/3.cc: New. * testsuite/23_containers/set/modifiers/swap.cc: Move to... * testsuite/23_containers/set/modifiers/swap/1.cc: ... here. * testsuite/23_containers/set/modifiers/swap/2.cc: New. * testsuite/23_containers/set/modifiers/swap/3.cc: New. * testsuite/23_containers/map/modifiers/swap.cc: Move to... * testsuite/23_containers/map/modifiers/swap/1.cc: ... here. * testsuite/23_containers/map/modifiers/swap/2.cc: New. * testsuite/23_containers/map/modifiers/swap/3.cc: New. * testsuite/23_containers/multiset/modifiers/swap.cc: Move to... * testsuite/23_containers/multiset/modifiers/swap/1.cc: ... here. * testsuite/23_containers/multiset/modifiers/swap/2.cc: New. * testsuite/23_containers/multiset/modifiers/swap/3.cc: New. * testsuite/23_containers/multimap/modifiers/swap.cc: Move to... * testsuite/23_containers/multimap/modifiers/swap/1.cc: ... here. * testsuite/23_containers/multimap/modifiers/swap/2.cc: New. * testsuite/23_containers/multimap/modifiers/swap/3.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_set/1.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_set/2.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_map/1.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_map/2.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_multiset/1.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_multiset/2.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_multimap/1.cc: New. * testsuite/tr1/6_containers/unordered/swap/unordered_multimap/2.cc: New. From-SVN: r109324
2006-01-04 12:34:45 +01:00
// (http://www.cantrip.org/emptyopt.html).
rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. 2005-11-18 Paolo Carlini <pcarlini@suse.de> * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. * include/ext/rc_string_base.h (__rc_string_base<>::_S_empty_rep()): Just use a static member. (__rc_string_base<>::__rc_string_base(), _S_construct): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Use anonymous union together with _CharT to fix alignment issues, rebind to _Rep and rename _Raw_alloc to _Rep_alloc_type. (__rc_string_base<>::_Rep::_S_create, _M_destroy): Adjust consistently. * include/ext/vstring_util.h (__is_null_p): Move inside struct __vstring_utility as static _S_is_null_pointer. * include/ext/sso_string.h (__sso_string_base<>::_M_construct(std::forward_iterator_tag): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_S_construct(std::forward_iterator_tag): Likewise. Implement Option 3 of DR 431 for ext/vstring - both available bases. * include/bits/cpp_type_traits.h (struct __is_empty): Add. * include/ext/vstring.h (__versa_string<>::swap): Delegate to this->_M_swap. * include/ext/vstring.tcc (__versa_string<>::swap): Remove. * include/ext/vstring_util.h (struct __vstring_utility<>): Add struct _Alloc_hider<>, augmented of allocator swapping facility, specialized to nop for empty allocators. * include/ext/rc_string_base.h (__rc_string_base<>::_M_swap): Use it. (__rc_string_base<>::_M_is_leaked, _M_set_sharable): Change to private. * include/ext/sso_string_base.h (__sso_string_base<>::_M_swap): Likewise. (__sso_string_base<>::_M_is_leaked, _M_set_sharable): Remove, unused. * include/ext/rc_string_base.h (__rc_string_base<>::_M_data(_CharT*): Return void. * include/ext/sso_string_base.h (__sso_string_base<>::_M_data(_CharT*): Likewise. From-SVN: r107176
2005-11-18 12:50:22 +01:00
template<typename _Alloc1>
struct _Alloc_hider
rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. 2005-11-18 Paolo Carlini <pcarlini@suse.de> * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. * include/ext/rc_string_base.h (__rc_string_base<>::_S_empty_rep()): Just use a static member. (__rc_string_base<>::__rc_string_base(), _S_construct): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Use anonymous union together with _CharT to fix alignment issues, rebind to _Rep and rename _Raw_alloc to _Rep_alloc_type. (__rc_string_base<>::_Rep::_S_create, _M_destroy): Adjust consistently. * include/ext/vstring_util.h (__is_null_p): Move inside struct __vstring_utility as static _S_is_null_pointer. * include/ext/sso_string.h (__sso_string_base<>::_M_construct(std::forward_iterator_tag): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_S_construct(std::forward_iterator_tag): Likewise. Implement Option 3 of DR 431 for ext/vstring - both available bases. * include/bits/cpp_type_traits.h (struct __is_empty): Add. * include/ext/vstring.h (__versa_string<>::swap): Delegate to this->_M_swap. * include/ext/vstring.tcc (__versa_string<>::swap): Remove. * include/ext/vstring_util.h (struct __vstring_utility<>): Add struct _Alloc_hider<>, augmented of allocator swapping facility, specialized to nop for empty allocators. * include/ext/rc_string_base.h (__rc_string_base<>::_M_swap): Use it. (__rc_string_base<>::_M_is_leaked, _M_set_sharable): Change to private. * include/ext/sso_string_base.h (__sso_string_base<>::_M_swap): Likewise. (__sso_string_base<>::_M_is_leaked, _M_set_sharable): Remove, unused. * include/ext/rc_string_base.h (__rc_string_base<>::_M_data(_CharT*): Return void. * include/ext/sso_string_base.h (__sso_string_base<>::_M_data(_CharT*): Likewise. From-SVN: r107176
2005-11-18 12:50:22 +01:00
: public _Alloc1
{
vstring.h (__versa_string<>:: __versa_string(__versa_string&&), [...]): Add. 2007-10-16 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>:: __versa_string(__versa_string&&), __versa_string<>::operator=(__versa_string&&, swap(__versa_string<>&&, __versa_string<>&), swap(__versa_string<>(&, __versa_string<>&&)): Add. (__versa_string<>::swap(__versa_string&&)): Adjust for C++0x. * include/ext/sso_string_base.h (__sso_string_base(__sso_string_base&&)): Add. (__sso_string_base()): Use _Alloc_hider(_CharT*). * include/ext/rc_string_base.h (__rc_string_base(__rc_string_base&&)): Add. (__rc_string_base()): Use _Alloc_hider(_CharT*). * include/ext/vstring_util.h (_Alloc_hider::_Alloc_hider(_CharT*)): Add. * testsuite/ext/vstring/moveable.cc: Add. * include/bits/stl_tree.h (_Rb_tree(_Rb_tree&&)): Add. * include/bits/stl_map.h (map<>::map(map&&)): Forward to the latter. * include/bits/stl_set.h (set<>::set(set&&)): Likewise. * include/bits/stl_multimap.h (multimap<>::multimap(multimap&&)): Likewise. * include/bits/stl_multiset.h (multiset<>::multiset(multiset&&)): Likewise. * include/bits/stl_deque.h (_Deque_base<>::_Deque_base(_Deque_base&&)): Add. (deque<>::deque(deque&&)): Forward to the latter. * include/bits/stl_list.h (_List_base<>::_List_base(_List_base&&)): Add. (list<>::list(list&&)): Forward to the latter. * include/bits/stl_vector.h (_Vector_base<>::_Vector_base(_Vector_base&&)): Add. (vector<>::vector(vector&&)): Forward to the latter. * include/bits/stl_bvector.h (_Bvector_base<>::_Bvector_base(_Bvector_base&&)): Add. (vector<bool>::vector(vector&&)): Forward to the latter. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Adjust dg-error lines. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. From-SVN: r129381
2007-10-16 17:20:09 +02:00
_Alloc_hider(_CharT* __ptr)
: _Alloc1(), _M_p(__ptr) { }
rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. 2005-11-18 Paolo Carlini <pcarlini@suse.de> * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere. * include/ext/rc_string_base.h (__rc_string_base<>::_S_empty_rep()): Just use a static member. (__rc_string_base<>::__rc_string_base(), _S_construct): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Use anonymous union together with _CharT to fix alignment issues, rebind to _Rep and rename _Raw_alloc to _Rep_alloc_type. (__rc_string_base<>::_Rep::_S_create, _M_destroy): Adjust consistently. * include/ext/vstring_util.h (__is_null_p): Move inside struct __vstring_utility as static _S_is_null_pointer. * include/ext/sso_string.h (__sso_string_base<>::_M_construct(std::forward_iterator_tag): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_S_construct(std::forward_iterator_tag): Likewise. Implement Option 3 of DR 431 for ext/vstring - both available bases. * include/bits/cpp_type_traits.h (struct __is_empty): Add. * include/ext/vstring.h (__versa_string<>::swap): Delegate to this->_M_swap. * include/ext/vstring.tcc (__versa_string<>::swap): Remove. * include/ext/vstring_util.h (struct __vstring_utility<>): Add struct _Alloc_hider<>, augmented of allocator swapping facility, specialized to nop for empty allocators. * include/ext/rc_string_base.h (__rc_string_base<>::_M_swap): Use it. (__rc_string_base<>::_M_is_leaked, _M_set_sharable): Change to private. * include/ext/sso_string_base.h (__sso_string_base<>::_M_swap): Likewise. (__sso_string_base<>::_M_is_leaked, _M_set_sharable): Remove, unused. * include/ext/rc_string_base.h (__rc_string_base<>::_M_data(_CharT*): Return void. * include/ext/sso_string_base.h (__sso_string_base<>::_M_data(_CharT*): Likewise. From-SVN: r107176
2005-11-18 12:50:22 +01:00
_Alloc_hider(const _Alloc1& __a, _CharT* __ptr)
: _Alloc1(__a), _M_p(__ptr) { }
_CharT* _M_p; // The actual data.
};
// When __n = 1 way faster than the general multichar
// traits_type::copy/move/assign.
static void
_S_copy(_CharT* __d, const _CharT* __s, size_type __n)
{
if (__n == 1)
traits_type::assign(*__d, *__s);
else
traits_type::copy(__d, __s, __n);
}
static void
_S_move(_CharT* __d, const _CharT* __s, size_type __n)
{
if (__n == 1)
traits_type::assign(*__d, *__s);
else
traits_type::move(__d, __s, __n);
}
static void
_S_assign(_CharT* __d, size_type __n, _CharT __c)
{
if (__n == 1)
traits_type::assign(*__d, __c);
else
traits_type::assign(__d, __n, __c);
}
// _S_copy_chars is a separate template to permit specialization
// to optimize for the common case of pointers as iterators.
template<typename _Iterator>
static void
_S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
{
for (; __k1 != __k2; ++__k1, ++__p)
traits_type::assign(*__p, *__k1); // These types are off.
}
static void
_S_copy_chars(_CharT* __p, __sso_iterator __k1, __sso_iterator __k2)
{ _S_copy_chars(__p, __k1.base(), __k2.base()); }
static void
_S_copy_chars(_CharT* __p, __const_sso_iterator __k1,
__const_sso_iterator __k2)
{ _S_copy_chars(__p, __k1.base(), __k2.base()); }
static void
_S_copy_chars(_CharT* __p, __rc_iterator __k1, __rc_iterator __k2)
{ _S_copy_chars(__p, __k1.base(), __k2.base()); }
static void
_S_copy_chars(_CharT* __p, __const_rc_iterator __k1,
__const_rc_iterator __k2)
{ _S_copy_chars(__p, __k1.base(), __k2.base()); }
static void
_S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
{ _S_copy(__p, __k1, __k2 - __k1); }
static void
_S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
{ _S_copy(__p, __k1, __k2 - __k1); }
static int
_S_compare(size_type __n1, size_type __n2)
{
const difference_type __d = difference_type(__n1 - __n2);
if (__d > __numeric_traits_integer<int>::__max)
return __numeric_traits_integer<int>::__max;
else if (__d < __numeric_traits_integer<int>::__min)
return __numeric_traits_integer<int>::__min;
else
return int(__d);
}
};
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _VSTRING_UTIL_H */