gcc/libstdc++-v3/include/ext/vstring.tcc

703 lines
23 KiB
Plaintext
Raw Normal View History

// Versatile string -*- C++ -*-
// Copyright (C) 2005-2015 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.tcc
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{ext/vstring.h}
*/
#ifndef _VSTRING_TCC
#define _VSTRING_TCC 1
#pragma GCC system_header
re PR libstdc++/36104 (gnu-versioned-namespace is broken) 2011-01-14 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 * include/Makefile.am (bits_sup_headers, stamp-bits-sup): New. * include/Makefile.in: Regenerate. * libsupc++/Makefile.am (std_HEADERS, bits_HEADERS): New. (install-stdHEADERS, install-bitsHEADERS): New. * libsupc++/Makefile.in: Regenerate. * include/bits/c++config: Update for inline namespaces. * libsupc++/cxxabi-forced.h: To... * libsupc++/cxxabi_forced.h: ...this. * libsupc++/hash_bytes.h: Separate file. * libsupc++/typeinfo: Use it. * libsupc++/exception: Adjust for bits subdirectory. * libsupc++/eh_aux_runtime.cc: Same. * libsupc++/eh_ptr.cc: Same. * libsupc++/new_op.cc: Same. * libsupc++/exception_defines.h: Same. * libsupc++/nested_exception.h: Same. * libsupc++/eh_terminate.cc: Same. * libsupc++/vec.cc: Same. * libsupc++/vterminate.cc: Same. * libsupc++/exception_ptr.h: Same. * libsupc++/eh_personality.cc: Same. * libsupc++/eh_call.cc: Same. * libsupc++/new_opnt.cc: Same. * libsupc++/hash_bytes.cc: Same. * config/cpu/arm/cxxabi_tweaks.h: Same. * config/cpu/generic/cxxabi_tweaks.h: Same. * libsupc++/cxxabi.h: Same. Consolidate _GLIBCXX_NOTHROW defines. * include/std/bitset: Same. * include/ext/vstring.tcc: Same. * include/bits/hashtable.h: Same. * include/bits/functional_hash.h: Same. * include/bits/hashtable_policy.h: Same. * include/bits/basic_string.h: Same. * include/bits/istream.tcc: Same. * include/bits/ostream.tcc: Same. * include/bits/algorithmfwd.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/ostream_insert.h: Same. * include/bits/fstream.tcc: Same. * include/bits/functexcept.h: Same. * doc/doxygen/user.cfg.in: Adjust names. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers. From-SVN: r168831
2011-01-15 01:27:10 +01:00
#include <bits/cxxabi_forced.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,
template <typename, typename, typename> class _Base>
const typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::npos;
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
void
__versa_string<_CharT, _Traits, _Alloc, _Base>::
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
resize(size_type __n, _CharT __c)
{
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
const size_type __size = this->size();
if (__size < __n)
this->append(__n - __size, __c);
else if (__n < __size)
this->_M_erase(__n, __size - __n);
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>&
__versa_string<_CharT, _Traits, _Alloc, _Base>::
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
_M_append(const _CharT* __s, size_type __n)
{
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
const size_type __len = __n + this->size();
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
if (__len <= this->capacity() && !this->_M_is_shared())
{
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
if (__n)
this->_S_copy(this->_M_data() + this->size(), __s, __n);
}
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
else
this->_M_mutate(this->size(), size_type(0), __s, __n);
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
this->_M_set_length(__len);
return *this;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
template<typename _InputIterator>
__versa_string<_CharT, _Traits, _Alloc, _Base>&
__versa_string<_CharT, _Traits, _Alloc, _Base>::
stl_list.h (list<>::insert(iterator, size_type, const value_type&), [...]): Adjust C++11 signatures to take const_iterator(s). 2013-07-01 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/stl_list.h (list<>::insert(iterator, size_type, const value_type&), list<>::insert(iterator, initializer_list<>), list<>::insert(iterator, _InputIterator, _InputIterator), list<>::splice(iterator, list&&), list<>::splice(iterator, list&), list<>::splice(iterator, list&&, iterator), list<>::splice(iterator, list&, iterator), list<>::splice(iterator, list&&, iterator, iterator), list<>::splice(iterator, list&, iterator, iterator)): Adjust C++11 signatures to take const_iterator(s). * include/bits/list.tcc (list<>::insert(const_iterator, size_type, const value_type&), list<>::insert(const_iterator, _InputIterator, _InputIterator)): Define. * include/ext/vstring.h (__versa_string<>::insert(iterator, size_type, _CharT), __versa_string<>::insert(iterator, _InputIterator, _InputIterator), __versa_string<>::insert(iterator, std::initializer_list<>), __versa_string<>::replace(iterator, iterator, _InputIterator, _InputIterator), __versa_string<>:: replace(iterator, iterator, std::initializer_list<>)): Adjust C++11 signatures to take const_iterator(s). (__versa_string<>::_M_replace_dispatch): Take const_iterators. * include/ext/vstring.tcc: Likewise. * include/debug/list: Adjust. * include/profile/list: Likewise. * testsuite/23_containers/list/operations/splice/const_iterator.cc: New. * testsuite/23_containers/list/modifiers/insert/const_iterator.cc: Extend. * testsuite/ext/vstring/modifiers/insert/char/const_iterator.cc: Likewise. * testsuite/ext/vstring/modifiers/insert/wchar_t/const_iterator.cc: Likewise. * testsuite/ext/vstring/modifiers/replace/char/const_iterator.cc: Likewise. * testsuite/ext/vstring/modifiers/replace/wchar_t/const_iterator.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust dg-error line number. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Likewise. From-SVN: r200580
2013-07-01 18:17:46 +02:00
_M_replace_dispatch(const_iterator __i1, const_iterator __i2,
_InputIterator __k1, _InputIterator __k2,
std::__false_type)
{
const __versa_string __s(__k1, __k2);
const size_type __n1 = __i2 - __i1;
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
return _M_replace(__i1 - _M_ibegin(), __n1, __s._M_data(),
__s.size());
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>&
__versa_string<_CharT, _Traits, _Alloc, _Base>::
_M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
_CharT __c)
{
_M_check_length(__n1, __n2, "__versa_string::_M_replace_aux");
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
const size_type __old_size = this->size();
const size_type __new_size = __old_size + __n2 - __n1;
if (__new_size <= this->capacity() && !this->_M_is_shared())
{
_CharT* __p = this->_M_data() + __pos1;
const size_type __how_much = __old_size - __pos1 - __n1;
if (__how_much && __n1 != __n2)
this->_S_move(__p + __n2, __p + __n1, __how_much);
}
else
this->_M_mutate(__pos1, __n1, 0, __n2);
if (__n2)
this->_S_assign(this->_M_data() + __pos1, __n2, __c);
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
this->_M_set_length(__new_size);
return *this;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>&
__versa_string<_CharT, _Traits, _Alloc, _Base>::
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
_M_replace(size_type __pos, size_type __len1, const _CharT* __s,
const size_type __len2)
{
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
_M_check_length(__len1, __len2, "__versa_string::_M_replace");
const size_type __old_size = this->size();
const size_type __new_size = __old_size + __len2 - __len1;
if (__new_size <= this->capacity() && !this->_M_is_shared())
{
_CharT* __p = this->_M_data() + __pos;
const size_type __how_much = __old_size - __pos - __len1;
if (_M_disjunct(__s))
{
if (__how_much && __len1 != __len2)
this->_S_move(__p + __len2, __p + __len1, __how_much);
if (__len2)
this->_S_copy(__p, __s, __len2);
}
else
{
// Work in-place.
if (__len2 && __len2 <= __len1)
this->_S_move(__p, __s, __len2);
if (__how_much && __len1 != __len2)
this->_S_move(__p + __len2, __p + __len1, __how_much);
if (__len2 > __len1)
{
if (__s + __len2 <= __p + __len1)
this->_S_move(__p, __s, __len2);
else if (__s >= __p + __len1)
this->_S_copy(__p, __s + __len2 - __len1, __len2);
else
{
const size_type __nleft = (__p + __len1) - __s;
this->_S_move(__p, __s, __nleft);
this->_S_copy(__p + __nleft, __p + __len2,
__len2 - __nleft);
}
}
}
}
else
this->_M_mutate(__pos, __len1, __s, __len2);
this->_M_set_length(__new_size);
return *this;
}
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>
operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
{
__versa_string<_CharT, _Traits, _Alloc, _Base> __str;
__str.reserve(__lhs.size() + __rhs.size());
__str.append(__lhs);
__str.append(__rhs);
return __str;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>
operator+(const _CharT* __lhs,
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
{
__glibcxx_requires_string(__lhs);
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
typedef __versa_string<_CharT, _Traits, _Alloc, _Base> __string_type;
typedef typename __string_type::size_type __size_type;
const __size_type __len = _Traits::length(__lhs);
__string_type __str;
__str.reserve(__len + __rhs.size());
__str.append(__lhs, __len);
__str.append(__rhs);
return __str;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>
operator+(_CharT __lhs,
const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
{
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
__versa_string<_CharT, _Traits, _Alloc, _Base> __str;
__str.reserve(__rhs.size() + 1);
__str.push_back(__lhs);
__str.append(__rhs);
return __str;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>
operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
const _CharT* __rhs)
{
__glibcxx_requires_string(__rhs);
typedef __versa_string<_CharT, _Traits, _Alloc, _Base> __string_type;
typedef typename __string_type::size_type __size_type;
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
const __size_type __len = _Traits::length(__rhs);
__string_type __str;
vstring.h (__versa_string<>::operator+, [...]): Move out of line... 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::operator+, all versions): Move out of line... * include/ext/vstring.tcc (__versa_string<>::operator+): ... here; consistently use reserve for the benefit of sso_string_base; prefer push_back to single-char append when appropriate. * include/ext/vstring.h (__versa_string<>::push_back): Don't call _M_reserve, _M_mutate instead. (reserve): Just forward to _M_reserve. * include/ext/vstring.tcc (__versa_string<>::_M_reserve): Remove. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Also do the initial checks (first on length, in case __res == capacity). * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve: Likewise; don't call _M_set_length unnecessarily. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.h (__versa_string<>::_M_append): New. (append(const __versa_string&), append(const __versa_string&, size_type, size_type), append(const _CharT*, size_type), append(const _CharT*)): Use it. (append(size_type, _CharT)): Delegate to _M_replace_aux. (assign(const __versa_string&, size_type, size_type), assign(const _CharT*), replace(size_type, size_type, const _CharT*, size_type)): Forward to _M_replace. * include/ext/vstring.tcc (__versa_string<>::_M_append): Define, core append functionality. (_M_replace): Simplify, move __s == 0 case to _M_replace_aux. (_M_replace_aux): Reorganize, don't call _M_replace. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/vstring.tcc (__versa_string<>::_M_replace): Perform _M_check_length at the beginning and remove it from ... (replace, _M_replace_dispatch, _M_replace_aux, assign): ... here. (assign): Now move inline. (resize): Don't call _M_check_length redundantly, append does. 2005-12-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_get_allocator): Add non const version. * include/ext/rc_string_base.h (__rc_string_base<>::_M_get_allocator): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_erase): Add. * include/ext/rc_string_base.h (__rc_string_base<>::_M_erase): Likewise. (_M_leak_hard): Use it. * include/ext/vstring.h (__versa_string<>::clear, erase, all versions): Use it. * include/ext/vstring.tcc (__versa_string<>::resize): Likewise. * include/ext/vstring.h (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.h (__versa_string<>::_M_replace): New, does the in-place work or delegates to _M_mutate in case of reallocation. * include/ext/vstring.tcc (__versa_string<>::_M_replace_safe): Remove. * include/ext/vstring.tcc (__versa_string<>::_M_replace): Define. (assign, replace, _M_replace_dispatch, _M_replace_aux): Use it. * include/ext/sso_string_base.h (__sso_string_base<>::_M_mutate): Change to manage only reallocations. * include/ext/rc_string_base.h (__rc_string_base<>::_M_mutate): Likewise. * include/ext/vstring.h (__versa_string<>::insert(size_type, const __versa_string&), insert(size_type, const __versa_string&, size_type, size_type), insert(size_type, const _CharT*, size_type), insert(size_type, const _CharT*)): Delegate to replace. * include/ext/vstring.h (__versa_string<>::reserve): Move out of line. * include/ext/vstring.tcc (__versa_string<>::reserve): Do the checks and call _M_reserve. * include/ext/vstring.h (__versa_string<>::append): Call _M_reserve instead of reserve. * include/ext/vstring.tcc (__versa_string<>::append, all versions): Likewise. * include/ext/sso_string_base.h (__sso_string_base<>::_M_reserve): Adjust. * include/ext/rc_string_base.h (__rc_string_base<>::_M_reserve): Likewise. From-SVN: r108034
2005-12-05 01:32:31 +01:00
__str.reserve(__lhs.size() + __len);
__str.append(__lhs);
__str.append(__rhs, __len);
return __str;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
__versa_string<_CharT, _Traits, _Alloc, _Base>
operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
_CharT __rhs)
{
__versa_string<_CharT, _Traits, _Alloc, _Base> __str;
__str.reserve(__lhs.size() + 1);
__str.append(__lhs);
__str.push_back(__rhs);
return __str;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
copy(_CharT* __s, size_type __n, size_type __pos) const
{
_M_check(__pos, "__versa_string::copy");
__n = _M_limit(__pos, __n);
__glibcxx_requires_string_len(__s, __n);
if (__n)
this->_S_copy(__s, this->_M_data() + __pos, __n);
// 21.3.5.7 par 3: do not append null. (good.)
return __n;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find(const _CharT* __s, size_type __pos, size_type __n) const
{
__glibcxx_requires_string_len(__s, __n);
const size_type __size = this->size();
const _CharT* __data = this->_M_data();
if (__n == 0)
return __pos <= __size ? __pos : npos;
if (__n <= __size)
{
for (; __pos <= __size - __n; ++__pos)
if (traits_type::eq(__data[__pos], __s[0])
&& traits_type::compare(__data + __pos + 1,
__s + 1, __n - 1) == 0)
return __pos;
}
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{
size_type __ret = npos;
const size_type __size = this->size();
if (__pos < __size)
{
const _CharT* __data = this->_M_data();
const size_type __n = __size - __pos;
const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
if (__p)
__ret = __p - __data;
}
return __ret;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
rfind(const _CharT* __s, size_type __pos, size_type __n) const
{
__glibcxx_requires_string_len(__s, __n);
const size_type __size = this->size();
if (__n <= __size)
{
__pos = std::min(size_type(__size - __n), __pos);
const _CharT* __data = this->_M_data();
do
{
if (traits_type::compare(__data + __pos, __s, __n) == 0)
return __pos;
}
while (__pos-- > 0);
}
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
rfind(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{
size_type __size = this->size();
if (__size)
{
if (--__size > __pos)
__size = __pos;
for (++__size; __size-- > 0; )
if (traits_type::eq(this->_M_data()[__size], __c))
return __size;
}
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
{
__glibcxx_requires_string_len(__s, __n);
for (; __n && __pos < this->size(); ++__pos)
{
const _CharT* __p = traits_type::find(__s, __n,
this->_M_data()[__pos]);
if (__p)
return __pos;
}
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
{
__glibcxx_requires_string_len(__s, __n);
size_type __size = this->size();
if (__size && __n)
{
if (--__size > __pos)
__size = __pos;
do
{
if (traits_type::find(__s, __n, this->_M_data()[__size]))
return __size;
}
while (__size-- != 0);
}
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
__glibcxx_requires_string_len(__s, __n);
for (; __pos < this->size(); ++__pos)
if (!traits_type::find(__s, __n, this->_M_data()[__pos]))
return __pos;
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find_first_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{
for (; __pos < this->size(); ++__pos)
if (!traits_type::eq(this->_M_data()[__pos], __c))
return __pos;
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
__glibcxx_requires_string_len(__s, __n);
size_type __size = this->size();
if (__size)
{
if (--__size > __pos)
__size = __pos;
do
{
if (!traits_type::find(__s, __n, this->_M_data()[__size]))
return __size;
}
while (__size--);
}
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>::
find_last_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{
size_type __size = this->size();
if (__size)
{
if (--__size > __pos)
__size = __pos;
do
{
if (!traits_type::eq(this->_M_data()[__size], __c))
return __size;
}
while (__size--);
}
return npos;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
int
__versa_string<_CharT, _Traits, _Alloc, _Base>::
compare(size_type __pos, size_type __n, const __versa_string& __str) const
{
_M_check(__pos, "__versa_string::compare");
__n = _M_limit(__pos, __n);
const size_type __osize = __str.size();
const size_type __len = std::min(__n, __osize);
int __r = traits_type::compare(this->_M_data() + __pos,
__str.data(), __len);
if (!__r)
__r = this->_S_compare(__n, __osize);
return __r;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
int
__versa_string<_CharT, _Traits, _Alloc, _Base>::
compare(size_type __pos1, size_type __n1, const __versa_string& __str,
size_type __pos2, size_type __n2) const
{
_M_check(__pos1, "__versa_string::compare");
__str._M_check(__pos2, "__versa_string::compare");
__n1 = _M_limit(__pos1, __n1);
__n2 = __str._M_limit(__pos2, __n2);
const size_type __len = std::min(__n1, __n2);
int __r = traits_type::compare(this->_M_data() + __pos1,
__str.data() + __pos2, __len);
if (!__r)
__r = this->_S_compare(__n1, __n2);
return __r;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
int
__versa_string<_CharT, _Traits, _Alloc, _Base>::
compare(const _CharT* __s) const
{
__glibcxx_requires_string(__s);
const size_type __size = this->size();
const size_type __osize = traits_type::length(__s);
const size_type __len = std::min(__size, __osize);
int __r = traits_type::compare(this->_M_data(), __s, __len);
if (!__r)
__r = this->_S_compare(__size, __osize);
return __r;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
int
__versa_string <_CharT, _Traits, _Alloc, _Base>::
compare(size_type __pos, size_type __n1, const _CharT* __s) const
{
__glibcxx_requires_string(__s);
_M_check(__pos, "__versa_string::compare");
__n1 = _M_limit(__pos, __n1);
const size_type __osize = traits_type::length(__s);
const size_type __len = std::min(__n1, __osize);
int __r = traits_type::compare(this->_M_data() + __pos, __s, __len);
if (!__r)
__r = this->_S_compare(__n1, __osize);
return __r;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
int
__versa_string <_CharT, _Traits, _Alloc, _Base>::
compare(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2) const
{
__glibcxx_requires_string_len(__s, __n2);
_M_check(__pos, "__versa_string::compare");
__n1 = _M_limit(__pos, __n1);
const size_type __len = std::min(__n1, __n2);
int __r = traits_type::compare(this->_M_data() + __pos, __s, __len);
if (!__r)
__r = this->_S_compare(__n1, __n2);
return __r;
}
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
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
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in,
__gnu_cxx::__versa_string<_CharT, _Traits,
_Alloc, _Base>& __str)
{
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
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef typename __istream_type::ios_base __ios_base;
typedef __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>
__string_type;
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
typedef typename __istream_type::int_type __int_type;
typedef typename __string_type::size_type __size_type;
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
typedef ctype<_CharT> __ctype_type;
typedef typename __ctype_type::ctype_base __ctype_base;
__size_type __extracted = 0;
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
typename __ios_base::iostate __err = __ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
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
{
// Avoid reallocation for common case.
__str.erase();
_CharT __buf[128];
__size_type __len = 0;
const streamsize __w = __in.width();
const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
: __str.max_size();
const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
const __int_type __eof = _Traits::eof();
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
__int_type __c = __in.rdbuf()->sgetc();
while (__extracted < __n
&& !_Traits::eq_int_type(__c, __eof)
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
&& !__ct.is(__ctype_base::space,
_Traits::to_char_type(__c)))
{
if (__len == sizeof(__buf) / sizeof(_CharT))
{
__str.append(__buf, sizeof(__buf) / sizeof(_CharT));
__len = 0;
}
__buf[__len++] = _Traits::to_char_type(__c);
++__extracted;
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
__c = __in.rdbuf()->snextc();
}
__str.append(__buf, __len);
if (_Traits::eq_int_type(__c, __eof))
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
__err |= __ios_base::eofbit;
__in.width(0);
}
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(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
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(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
// might cause endless loop
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
__in._M_setstate(__ios_base::badbit);
}
}
// 211. operator>>(istream&, string&) doesn't set failbit
if (!__extracted)
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
__err |= __ios_base::failbit;
if (__err)
__in.setstate(__err);
return __in;
}
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __in,
__gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>& __str,
_CharT __delim)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
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
typedef typename __istream_type::ios_base __ios_base;
typedef __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>
__string_type;
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
typedef typename __istream_type::int_type __int_type;
typedef typename __string_type::size_type __size_type;
__size_type __extracted = 0;
const __size_type __n = __str.max_size();
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
typename __ios_base::iostate __err = __ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
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
{
// Avoid reallocation for common case.
__str.erase();
_CharT __buf[128];
__size_type __len = 0;
const __int_type __idelim = _Traits::to_int_type(__delim);
const __int_type __eof = _Traits::eof();
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
__int_type __c = __in.rdbuf()->sgetc();
while (__extracted < __n
&& !_Traits::eq_int_type(__c, __eof)
&& !_Traits::eq_int_type(__c, __idelim))
{
if (__len == sizeof(__buf) / sizeof(_CharT))
{
__str.append(__buf, sizeof(__buf) / sizeof(_CharT));
__len = 0;
}
__buf[__len++] = _Traits::to_char_type(__c);
++__extracted;
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
__c = __in.rdbuf()->snextc();
}
__str.append(__buf, __len);
if (_Traits::eq_int_type(__c, __eof))
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
__err |= __ios_base::eofbit;
else if (_Traits::eq_int_type(__c, __idelim))
{
++__extracted;
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
__in.rdbuf()->sbumpc();
}
else
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
__err |= __ios_base::failbit;
}
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(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
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(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
// might cause endless loop
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
__in._M_setstate(__ios_base::badbit);
}
}
if (!__extracted)
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
__err |= __ios_base::failbit;
if (__err)
__in.setstate(__err);
return __in;
}
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
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_TCC