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

853 lines
24 KiB
C
Raw Normal View History

// Locale support -*- C++ -*-
// Copyright (C) 1997-2016 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 bits/locale_classes.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{locale}
*/
localefwd.h: Consistent @file placement... 2006-12-05 Benjamin Kosnik <bkoz@redhat.com> * include/bits/localefwd.h: Consistent @file placement, use include/ as part of the path for files that have shadows instead of no name. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_classes.h: Same. * include/bits/locale_facets.h: Same. * include/bits/indirect_array.h: Same. * include/bits/basic_string.h: Same. * include/bits/ios_base.h: Same. * include/bits/postypes.h: Same. * include/bits/codecvt.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/char_traits.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config: Same. * include/bits/valarray_array.h: Same. * include/bits/valarray_before.h: Same. * include/bits/cpp_type_traits.h: Same. * include/c/std_cerrno.h: Same. * include/precompiled/extc++.h: Same. * include/precompiled/stdtr1c++.h: Same. * include/precompiled/stdc++.h: Same. * include/tr1/cinttypes: Same. * include/tr1/fenv.h: Same. * include/tr1/mu_iterate.h: Same. * include/tr1/cstdio: Same. * include/tr1/limits.h: Same. * include/tr1/ctgmath: Same. * include/tr1/cstdarg: Same. * include/tr1/tuple: Same. * include/tr1/float.h: Same. * include/tr1/stdint.h: Same. * include/tr1/tuple_iterate.h: Same. * include/tr1/type_traits_fwd.h: Same. * include/tr1/hashtable_policy.h: Same. * include/tr1/cfenv: Same. * include/tr1/wctype.h: Same. * include/tr1/ref_fwd.h: Same. * include/tr1/bind_repeat.h: Same. * include/tr1/utility: Same. * include/tr1/climits: Same. * include/tr1/type_traits: Same. * include/tr1/stdlib.h: Same. * include/tr1/cwchar: Same. * include/tr1/stdio.h: Same. * include/tr1/ref_wrap_iterate.h: Same. * include/tr1/cstdint: Same. * include/tr1/memory: Same. * include/tr1/cstdbool: Same. * include/tr1/cwctype: Same. * include/tr1/bind_iterate.h: Same. * include/tr1/math.h: Same. * include/tr1/random: Same. * include/tr1/tuple_defs.h: Same. * include/tr1/cstdlib: Same. * include/tr1/unordered_map: Same. * include/tr1/boost_shared_ptr.h: Same. * include/tr1/cctype: Same. * include/tr1/random.tcc: Same. * include/tr1/wchar.h: Same. * include/tr1/hashtable: Same. * include/tr1/cmath: Same. * include/tr1/stdbool.h: Same. * include/tr1/ctime: Same. * include/tr1/functional: Same. * include/tr1/unordered_set: Same. * include/tr1/inttypes.h: Same. * include/tr1/functional_iterate.h: Same. * include/tr1/repeat.h: Same. * include/tr1/complex: Same. * include/tr1/cfloat: Same. * include/tr1/ctype.h: Same. * include/tr1/stdarg.h: Same. * include/tr1/tgmath.h: Same. * include/tr1/array: Same. * include/tr1/common.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_queue.h: Same. * include/std/std_algorithm.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_iterator.h: Same. * include/std/std_ios.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_set.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_functional.h: Same. * include/std/std_numeric.h: Same. * include/std/std_vector.h: Same. * include/std/std_deque.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_utility.h: Same. * include/std/std_stack.h: Same. * include/std/std_string.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_list.h: Same. * include/std/std_map.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_cerrno.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_climits.h: Same. * include/c_std/std_cassert.h: Same. * include/c_std/cmath.tcc * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cfloat.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * config/locale/gnu/c_locale.h: Namespace scope in all files. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/c++locale_internal.h: Same. * config/locale/gnu/time_members.h: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/ieee_1003.1-2001/messages_members.h: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/messages_members.h: Same. * config/locale/generic/time_members.h: Same. * config/allocator/mt_allocator_base.h: Same. * config/allocator/malloc_allocator_base.h: Same. * config/allocator/new_allocator_base.h: Same. * config/allocator/pool_allocator_base.h: Same. * config/allocator/bitmap_allocator_base.h: Same. * config/os/windiss/ctype_noninline.h: Same. * config/os/windiss/os_defines.h: Same. * config/os/windiss/ctype_inline.h: Same. * config/os/newlib/ctype_noninline.h: Same. * config/os/newlib/os_defines.h: Same. * config/os/newlib/ctype_inline.h: Same. * config/os/aix/ctype_noninline.h: Same. * config/os/aix/os_defines.h: Same. * config/os/aix/ctype_inline.h: Same. * config/os/vxworks/ctype_noninline.h: Same. * config/os/vxworks/os_defines.h: Same. * config/os/vxworks/ctype_inline.h: Same. * config/os/hpux/ctype_noninline.h: Same. * config/os/hpux/os_defines.h: Same. * config/os/hpux/ctype_inline.h: Same. * config/os/mingw32/ctype_noninline.h: Same. * config/os/mingw32/os_defines.h: Same. * config/os/mingw32/ctype_inline.h: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * config/os/gnu-linux/os_defines.h: Same. * config/os/gnu-linux/ctype_inline.h: Same. * config/os/tpf/ctype_noninline.h: Same. * config/os/tpf/os_defines.h: Same. * config/os/tpf/ctype_inline.h: Same. * config/os/uclibc/ctype_noninline.h: Same. * config/os/uclibc/os_defines.h: Same. * config/os/uclibc/ctype_inline.h: Same. * config/os/djgpp/ctype_noninline.h: Same. * config/os/djgpp/os_defines.h: Same. * config/os/djgpp/ctype_inline.h: Same. * config/os/qnx/qnx6.1/ctype_noninline.h: Same. * config/os/qnx/qnx6.1/ctype_inline.h: Same. * config/os/bsd/netbsd/ctype_noninline.h: Same. * config/os/bsd/netbsd/ctype_inline.h: Same. * config/os/bsd/darwin/ctype_noninline.h: Same. * config/os/bsd/darwin/ctype_inline.h: Same. * config/os/bsd/freebsd/ctype_noninline.h: Same. * config/os/bsd/freebsd/ctype_inline.h: Same. * config/os/irix/irix5.2/ctype_noninline.h: Same. * config/os/irix/irix5.2/ctype_inline.h: Same. * config/os/irix/irix6.5/ctype_noninline.h: Same. * config/os/irix/irix6.5/ctype_inline.h: Same. * config/os/solaris/solaris2.5/ctype_noninline.h: Same. * config/os/solaris/solaris2.5/ctype_inline.h: Same. * config/os/solaris/solaris2.6/ctype_noninline.h: Same. * config/os/solaris/solaris2.6/ctype_inline.h: Same. * config/os/solaris/solaris2.7/ctype_noninline.h: Same. * config/os/solaris/solaris2.7/ctype_inline.h: Same. * config/os/generic/ctype_noninline.h: Same. * config/os/generic/os_defines.h: Same. * config/os/generic/ctype_inline.h: Same. * config/cpu/arm/cxxabi_tweaks.h: Same. * config/cpu/powerpc/cpu_defines.h: Same. * config/cpu/generic/cxxabi_tweaks.h: Same. * config/cpu/generic/cpu_defines.h: Same. * config/cpu/generic/atomic_word.h: Same. * config/io/c_io_stdio.h: Same. * config/abi/compatibility.h: Same. * docs/doxygen/user.cfg.in: Adjust file list. From-SVN: r119561
2006-12-06 00:24:07 +01:00
//
// ISO C++ 14882: 22.1 Locales
//
#ifndef _LOCALE_CLASSES_H
#define _LOCALE_CLASSES_H 1
#pragma GCC system_header
#include <bits/localefwd.h>
#include <string>
atomicity.h: Move to... 2006-09-13 Benjamin Kosnik <bkoz@redhat.com> * include/bits/atomicity.h: Move to... * include/ext/atomicity.h: ...here. * include/bits/concurrence.h: Move to... * include/ext/concurrence.h: ...here. * include/Makefile.am (ext_headers): Additions. (bits_headers): Subtractions. * include/Makefile.in: Regenerate. * include/ext/bitmap_allocator.h (_Mutex), __threads_enabled, _Lock, _Auto_Lock): Subsume into... * include/bits/concurrence.h (__mutex): ..this. Error check locking and unlocking. (lock): Uglify to... (__scoped_lock): Use __mutex. (__glibcxx_mutex_define_initialized): Remove. (__glibcxx_mutex_type): Remove. * include/tr1/boost_shared_ptr.h: Formating tweaks, adjustments. (_Lock_policy): Move from here... * include/ext/concurrence.h: ... to here. (__shared_ptr_default_lock_mode): To __default_lock_policy. (_S_lockfree): To _S_atomic. Document. * libsupc++/guard.cc (static_mutex): Subsume into and fixup for... * include/ext/concurrence.h (__recursive_mutex): ...this. Error check locking and unlocking. * libsupc++/eh_alloc.cc: Use __scoped_lock. * config/os/aix/atomicity.h: Fixups for include paths, mutex to __scoped_mutex change, removal of locking defines. * config/os/irix/atomicity.h: Same. * config/cpu/cris/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_mutex/atomicity.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/rc_string_base.h: Same. * include/ext/mt_allocator.h: Same. * include/bits/locale_classes.h: Same. * include/bits/basic_string.h: Same. * include/bits/ios_base.h: Same. * include/tr1/memory: Same. * src/pool_allocator.cc: Same. * src/mt_allocator.cc: Same. * src/locale_init.cc: Same. * src/ios.cc: Same. * src/locale.cc: Same. * src/bitmap_allocator.cc: Same. * src/ios_init.cc: Same. * src/debug.cc: Same. From-SVN: r116942
2006-09-14 11:48:15 +02:00
#include <ext/atomicity.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 std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
// 22.1.1 Class locale
/**
* @brief Container class for localization functionality.
* @ingroup locales
*
* The locale class is first a class wrapper for C library locales. It is
* also an extensible container for user-defined localization. A locale is
* a collection of facets that implement various localization features such
* as money, time, and number printing.
*
* Constructing C++ locales does not change the C library locale.
*
* This library supports efficient construction and copying of locales
* through a reference counting implementation of the locale class.
*/
class locale
{
public:
// Types:
/// Definition of locale::category.
typedef int category;
// Forward decls and friends:
class facet;
class id;
class _Impl;
friend class facet;
friend class _Impl;
template<typename _Facet>
friend bool
has_facet(const locale&) throw();
template<typename _Facet>
friend const _Facet&
use_facet(const locale&);
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
template<typename _Cache>
friend struct __use_cache;
//@{
/**
* @brief Category values.
*
* The standard category values are none, ctype, numeric, collate, time,
* monetary, and messages. They form a bitmask that supports union and
* intersection. The category all is the union of these values.
*
* NB: Order must match _S_facet_categories definition in locale.cc
*/
static const category none = 0;
static const category ctype = 1L << 0;
static const category numeric = 1L << 1;
static const category collate = 1L << 2;
static const category time = 1L << 3;
static const category monetary = 1L << 4;
static const category messages = 1L << 5;
static const category all = (ctype | numeric | collate |
time | monetary | messages);
//@}
// Construct/copy/destroy:
/**
* @brief Default constructor.
*
* Constructs a copy of the global locale. If no locale has been
re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/42460 * doc/doxygen/user.cfg.in: Update file list. * include/debug/safe_sequence.h: Doxygen markup fixes for '' and "". * include/debug/safe_base.h: Same. * include/debug/macros.h: Same. * include/tr1_impl/regex: Same. * include/std/iostream: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/omp_loop_static.h: Same. * include/parallel/omp_loop.h: Same. * include/c_std/csignal: Same. * include/c_std/cstdlib: Same. * include/c_std/cstdio: Same. * include/c_std/cstdarg: Same. * include/c_std/cctype: Same. * include/c_std/cerrno: Same. * include/c_std/cmath: Same. * include/c_std/ciso646: Same. * include/c_std/ctime: Same. * include/c_std/clocale: Same. * include/c_std/climits: Same. * include/c_std/cassert: Same. * include/c_std/csetjmp: Same. * include/c_std/cwchar: Same. * include/c_std/cfloat: Same. * include/c_std/cstring: Same. * include/c_std/cstddef: Same. * include/c_std/cwctype: Same. * include/profile/iterator_tracker.h: Same. * include/profile/impl/profiler_trace.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/detail/pat_trie_/pat_trie_.h.pp: Same. * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.h.pp: Same. * include/ext/pb_ds/detail/type_utils.hpp: Same. * include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp: Same * include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp: Same. * include/ext/rc_string_base.h: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/functional: Same. * include/ext/mt_allocator.h: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: 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/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/random.tcc: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/random.h: Same. * include/bits/allocator.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/c_global/csignal: Same. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/tr1/hypergeometric.tcc: Same. * include/tr1/random.tcc: Same. * include/tr1/functional: Same. * include/tr1/random.h: Same. * include/backward/auto_ptr.h: Same. * include/backward/binders.h: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r156502
2010-02-04 19:20:34 +01:00
* explicitly set, this is the C locale.
*/
locale() throw();
/**
* @brief Copy constructor.
*
* Constructs a copy of @a other.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __other The locale to copy.
*/
locale(const locale& __other) throw();
/**
* @brief Named locale constructor.
*
* Constructs a copy of the named C library locale.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __s Name of the locale to construct.
* @throw std::runtime_error if __s is null or an undefined locale.
*/
explicit
locale(const char* __s);
/**
* @brief Construct locale with facets from another locale.
*
* Constructs a copy of the locale @a base. The facets specified by @a
* cat are replaced with those from the locale named by @a s. If base is
* named, this locale instance will also be named.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __base The locale to copy.
* @param __s Name of the locale to use facets from.
* @param __cat Set of categories defining the facets to use from __s.
* @throw std::runtime_error if __s is null or an undefined locale.
*/
locale(const locale& __base, const char* __s, category __cat);
#if __cplusplus >= 201103L
/**
* @brief Named locale constructor.
*
* Constructs a copy of the named C library locale.
*
* @param __s Name of the locale to construct.
* @throw std::runtime_error if __s is an undefined locale.
*/
explicit
locale(const std::string& __s) : locale(__s.c_str()) { }
/**
* @brief Construct locale with facets from another locale.
*
* Constructs a copy of the locale @a base. The facets specified by @a
* cat are replaced with those from the locale named by @a s. If base is
* named, this locale instance will also be named.
*
* @param __base The locale to copy.
* @param __s Name of the locale to use facets from.
* @param __cat Set of categories defining the facets to use from __s.
* @throw std::runtime_error if __s is an undefined locale.
*/
locale(const locale& __base, const std::string& __s, category __cat)
: locale(__base, __s.c_str(), __cat) { }
#endif
/**
* @brief Construct locale with facets from another locale.
*
* Constructs a copy of the locale @a base. The facets specified by @a
* cat are replaced with those from the locale @a add. If @a base and @a
* add are named, this locale instance will also be named.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __base The locale to copy.
* @param __add The locale to use facets from.
* @param __cat Set of categories defining the facets to use from add.
*/
locale(const locale& __base, const locale& __add, category __cat);
/**
* @brief Construct locale with another facet.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* Constructs a copy of the locale @a __other. The facet @a __f
* is added to @a __other, replacing an existing facet of type
* Facet if there is one. If @a __f is null, this locale is a
* copy of @a __other.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __other The locale to copy.
* @param __f The facet to add in.
*/
template<typename _Facet>
locale(const locale& __other, _Facet* __f);
/// Locale destructor.
~locale() throw();
/**
* @brief Assignment operator.
*
* Set this locale to be a copy of @a other.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __other The locale to copy.
* @return A reference to this locale.
*/
const locale&
operator=(const locale& __other) throw();
/**
* @brief Construct locale with another facet.
*
* Constructs and returns a new copy of this locale. Adds or replaces an
* existing facet of type Facet from the locale @a other into the new
* locale.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @tparam _Facet The facet type to copy from other
* @param __other The locale to copy from.
* @return Newly constructed locale.
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @throw std::runtime_error if __other has no facet of type _Facet.
*/
template<typename _Facet>
locale
combine(const locale& __other) const;
// Locale operations:
/**
* @brief Return locale name.
* @return Locale name or "*" if unnamed.
*/
New std::string implementation. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-12-19 19:16:39 +01:00
_GLIBCXX_DEFAULT_ABI_TAG
string
name() const;
/**
* @brief Locale equality.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __other The locale to compare against.
* @return True if other and this refer to the same locale instance, are
* copies, or have the same name. False otherwise.
*/
bool
operator==(const locale& __other) const throw();
/**
* @brief Locale inequality.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __other The locale to compare against.
* @return ! (*this == __other)
*/
bool
operator!=(const locale& __other) const throw()
{ return !(this->operator==(__other)); }
/**
* @brief Compare two strings according to collate.
*
* Template operator to compare two strings using the compare function of
* the collate facet in this locale. One use is to provide the locale to
* the sort function. For example, a vector v of strings could be sorted
* according to locale loc by doing:
* @code
* std::sort(v.begin(), v.end(), loc);
* @endcode
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __s1 First string to compare.
* @param __s2 Second string to compare.
* @return True if collate<_Char> facet compares __s1 < __s2, else false.
*/
template<typename _Char, typename _Traits, typename _Alloc>
bool
operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
const basic_string<_Char, _Traits, _Alloc>& __s2) const;
// Global locale objects:
/**
* @brief Set global locale
*
* This function sets the global locale to the argument and returns a
* copy of the previous global locale. If the argument has a name, it
* will also call std::setlocale(LC_ALL, loc.name()).
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __loc The new locale to make global.
* @return Copy of the old global locale.
*/
static locale
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
global(const locale& __loc);
/**
re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/42460 * doc/doxygen/user.cfg.in: Update file list. * include/debug/safe_sequence.h: Doxygen markup fixes for '' and "". * include/debug/safe_base.h: Same. * include/debug/macros.h: Same. * include/tr1_impl/regex: Same. * include/std/iostream: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/omp_loop_static.h: Same. * include/parallel/omp_loop.h: Same. * include/c_std/csignal: Same. * include/c_std/cstdlib: Same. * include/c_std/cstdio: Same. * include/c_std/cstdarg: Same. * include/c_std/cctype: Same. * include/c_std/cerrno: Same. * include/c_std/cmath: Same. * include/c_std/ciso646: Same. * include/c_std/ctime: Same. * include/c_std/clocale: Same. * include/c_std/climits: Same. * include/c_std/cassert: Same. * include/c_std/csetjmp: Same. * include/c_std/cwchar: Same. * include/c_std/cfloat: Same. * include/c_std/cstring: Same. * include/c_std/cstddef: Same. * include/c_std/cwctype: Same. * include/profile/iterator_tracker.h: Same. * include/profile/impl/profiler_trace.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/detail/pat_trie_/pat_trie_.h.pp: Same. * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.h.pp: Same. * include/ext/pb_ds/detail/type_utils.hpp: Same. * include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp: Same * include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp: Same. * include/ext/rc_string_base.h: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/functional: Same. * include/ext/mt_allocator.h: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: 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/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/random.tcc: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/random.h: Same. * include/bits/allocator.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/c_global/csignal: Same. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/tr1/hypergeometric.tcc: Same. * include/tr1/random.tcc: Same. * include/tr1/functional: Same. * include/tr1/random.h: Same. * include/backward/auto_ptr.h: Same. * include/backward/binders.h: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r156502
2010-02-04 19:20:34 +01:00
* @brief Return reference to the C locale.
*/
static const locale&
classic();
private:
// The (shared) implementation
_Impl* _M_impl;
// The "C" reference locale
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
static _Impl* _S_classic;
// Current global locale
static _Impl* _S_global;
// Names of underlying locale categories.
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
// NB: locale::global() has to know how to modify all the
// underlying categories, not just the ones required by the C++
// standard.
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
static const char* const* const _S_categories;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
// Number of standard categories. For C++, these categories are
// collate, ctype, monetary, numeric, time, and messages. These
// directly correspond to ISO C99 macros LC_COLLATE, LC_CTYPE,
// LC_MONETARY, LC_NUMERIC, and LC_TIME. In addition, POSIX (IEEE
// 1003.1-2001) specifies LC_MESSAGES.
// In addition to the standard categories, the underlying
// operating system is allowed to define extra LC_*
// macros. For GNU systems, the following are also valid:
// LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT,
// and LC_IDENTIFICATION.
enum { _S_categories_size = 6 + _GLIBCXX_NUM_CATEGORIES };
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
#ifdef __GTHREADS
static __gthread_once_t _S_once;
#endif
explicit
locale(_Impl*) throw();
static void
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
_S_initialize();
static void
_S_initialize_once() throw();
static category
_S_normalize_category(category);
void
_M_coalesce(const locale& __base, const locale& __add, category __cat);
New std::string implementation. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-12-19 19:16:39 +01:00
#if _GLIBCXX_USE_CXX11_ABI
static const id* const _S_twinned_facets[];
#endif
};
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
// 22.1.1.1.2 Class locale::facet
/**
* @brief Localization functionality base class.
* @ingroup locales
*
* The facet class is the base class for a localization feature, such as
* money, time, and number printing. It provides common support for facets
* and reference management.
*
* Facets may not be copied or assigned.
*/
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
class locale::facet
{
private:
friend class locale;
friend class locale::_Impl;
mutable _Atomic_word _M_refcount;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
// Contains data from the underlying "C" library for the classic locale.
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
static __c_locale _S_c_locale;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
// String literal for the name of the classic locale.
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
static const char _S_c_name[2];
#ifdef __GTHREADS
static __gthread_once_t _S_once;
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
#endif
static void
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
_S_initialize_once();
protected:
/**
* @brief Facet constructor.
*
* This is the constructor provided by the standard. If refs is 0, the
* facet is destroyed when the last referencing locale is destroyed.
* Otherwise the facet will never be destroyed.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __refs The initial value for reference count.
*/
explicit
facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0)
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
{ }
/// Facet destructor.
virtual
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
~facet();
static void
_S_create_c_locale(__c_locale& __cloc, const char* __s,
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
__c_locale __old = 0);
static __c_locale
_S_clone_c_locale(__c_locale& __cloc) throw();
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
static void
_S_destroy_c_locale(__c_locale& __cloc);
static __c_locale
_S_lc_ctype_c_locale(__c_locale __cloc, const char* __s);
// Returns data from the underlying "C" library data for the
// classic locale.
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
static __c_locale
_S_get_c_locale();
condition_variable.cc (condition_variable, [...]): Mark throw() * src/condition_variable.cc (condition_variable, condition_variable_any constructors): Mark throw() * src/hash.cc (operator() for long double, string, and wstring): Mark throw (). * src/strstream.cc (strstreambuf constructors, freeze, str, pcount, _M_setup, rdbuf, str): Mark throw (). * src/chrono.cc (new): Mark throw (). * include/std/system_error (system_category, generic_category): Mark throw () and const. * include/std/chrono (now): Mark throw (). * include/std/condition_variable (condition_variable, ~condition_variable, condition_variable_any, ~condition_variable_any): Mark throw (). * include/std/mutex (mutex): Mark throw (). * include/bits/stl_list.h (swap, transfer, reverse, hook, unhook): Mark throw. * include/bits/functional_hash.h (operator() on size_t): Mark pure and throw (). * include/bits/locale_facets.tcc (__verify_grouping): Mark pure. * include/bits/locale_classes.h (_S_initialize_once, _S_clone_c_locale): Mark throw (). (_S_get_c_name): Mark const and throw (). (_M_id, _M_compare, _M_transform, _M_compare, _M_transform): Mark throw (). * include/bits/locale_facets.h (__convert_to_v explicit instances): Mark throw (). (_M_convert_to_wmask, _M_initialize_ctype, _S_format_float): Mark throw (). * include/bits/ios_base.h (_M_dispose_callbacks, _M_init, imbue, ios_base): Mark throw () * include/bits/locale_facets_nonio.h (_M_put): Mark throw. * include/backward/strstream (strstreambuf constructors): Mark throw (). (str, freeze, _M_setupf): Mark throw (). (pcount): Mark pure and throw (). (rdbuf): Mark const and throw (). From-SVN: r146328
2009-04-18 23:19:18 +02:00
_GLIBCXX_CONST static const char*
_S_get_c_name() throw();
#if __cplusplus < 201103L
private:
facet(const facet&); // Not defined.
facet&
operator=(const facet&); // Not defined.
#else
facet(const facet&) = delete;
facet&
operator=(const facet&) = delete;
#endif
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
private:
void
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
_M_add_reference() const throw()
{ __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
void
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
_M_remove_reference() const throw()
{
// Be race-detector-friendly. For more info see bits/c++config.
_GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_refcount);
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
{
_GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_refcount);
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
{ delete this; }
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
{ }
}
}
New std::string implementation. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-12-19 19:16:39 +01:00
class __shim;
const facet* _M_sso_shim(const id*) const;
const facet* _M_cow_shim(const id*) const;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
};
// 22.1.1.1.3 Class locale::id
/**
* @brief Facet ID class.
* @ingroup locales
*
* The ID class provides facets with an index used to identify them.
* Every facet class must define a public static member locale::id, or be
* derived from a facet that provides this member, otherwise the facet
* cannot be used in a locale. The locale::id ensures that each class
* type gets a unique identifier.
*/
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
class locale::id
{
private:
friend class locale;
friend class locale::_Impl;
template<typename _Facet>
friend const _Facet&
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
use_facet(const locale&);
template<typename _Facet>
friend bool
has_facet(const locale&) throw();
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
// NB: There is no accessor for _M_index because it may be used
// before the constructor is run; the effect of calling a member
// function (even an inline) would be undefined.
mutable size_t _M_index;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
// Last id number assigned.
static _Atomic_word _S_refcount;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
void
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
operator=(const id&); // Not defined.
id(const id&); // Not defined.
public:
// NB: This class is always a static data member, and thus can be
// counted on to be zero-initialized.
/// Constructor.
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
id() { }
size_t
_M_id() const throw();
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
};
// Implementation object for locale.
class locale::_Impl
{
public:
// Friends.
friend class locale;
friend class locale::facet;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
template<typename _Facet>
friend bool
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
has_facet(const locale&) throw();
template<typename _Facet>
friend const _Facet&
use_facet(const locale&);
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
template<typename _Cache>
friend struct __use_cache;
private:
// Data Members.
_Atomic_word _M_refcount;
const facet** _M_facets;
size_t _M_facets_size;
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
const facet** _M_caches;
char** _M_names;
static const locale::id* const _S_id_ctype[];
static const locale::id* const _S_id_numeric[];
static const locale::id* const _S_id_collate[];
static const locale::id* const _S_id_time[];
static const locale::id* const _S_id_monetary[];
static const locale::id* const _S_id_messages[];
static const locale::id* const* const _S_facet_categories[];
void
_M_add_reference() throw()
{ __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
void
_M_remove_reference() throw()
{
// Be race-detector-friendly. For more info see bits/c++config.
_GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_refcount);
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
{
_GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_refcount);
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
{ delete this; }
re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
2009-02-04 00:44:53 +01:00
__catch(...)
{ }
}
}
_Impl(const _Impl&, size_t);
_Impl(const char*, size_t);
[multiple changes] 2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * config/linker-map.gnu: Export _S_get_c_locale instead of _S_c_locale object. 2003-10-02 Petur Runolfsson <peturr02@ru.is> * config/locale/generic/c_locale.cc (category_names, locale::_S_categories): Const qualify. * config/locale/gnu/c_locale.cc: Same. * config/locale/generic/time_members.h (__timepunct::__timepunct): Copy string contents before assigning to _M_name_timepunct, qualify strcpy and strlen with std::. * config/locale/gnu/time_members.h: Same. * config/locale/gnu/messages_members.h (messages::messages): Copy string contents before assigning to _M_name_messages, qualify strcpy and strlen with std::. * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table()): Don't call locale::classic(). * include/bits/locale_classes.h (locale::_S_categories): Const qualify. (locale::_S_once, locale::_S_initialize_once, locale::facet::_S_once, locale::facet::_S_initialize_once, locale::facet::_S_get_c_locale): Declare. (locale::_S_initialize): Don't define. (locale::facet::_S_c_locale): Make private. (locale::facet::_S_c_name): Same, const qualify. (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier. * include/bits/locale_facets.h (__timepunct::_M_name_timepunct, messages::_M_name_messages): Const qualify. * src/locale.cc (locale::_S_once, locale::facet::_S_once): Define. (locale::classic): Move initialization code... (locale::_S_initialize_once): ...here. (locale::_S_initialize): Call _S_initialize_once through __gthread_once. (locale::facet::_S_initialize_once): Initialize _S_c_locale. (locale::facet::_S_get_c_locale): Call _S_initialize_once through __gthread_once before returning _S_c_locale. * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused parameters, add throw() specifier, don't initialize locale::facet::_S_c_locale and _S_c_name. * config/locale/generic/messages_members.h: Replace _S_c_locale with _S_get_c_locale(). * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/os/gnu-linux/ctype_noninline.h: Same. * include/bits/locale_facets.h: Same. * include/bits/locale_facets.tcc: Same. * src/codecvt.cc: Same. * src/ctype.cc: Same. From-SVN: r72040
2003-10-02 18:56:39 +02:00
_Impl(size_t) throw();
~_Impl() throw();
_Impl(const _Impl&); // Not defined.
void
operator=(const _Impl&); // Not defined.
bool
_M_check_same_name()
{
bool __ret = true;
if (_M_names[1])
// We must actually compare all the _M_names: can be all equal!
for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i)
pod_char_traits.h (char_traits<>::move): Use __builtin_memmove. 2007-05-11 Paolo Carlini <pcarlini@suse.de> * include/ext/pod_char_traits.h (char_traits<>::move): Use __builtin_memmove. * include/bits/locale_classes.h (locale::_Impl::_M_check_same_name, collate_byname(const char*, size_t)): Use __builtin_strcmp. * include/bits/locale_facets.h: Use __builtin_mem* and __builtin_str* everywhere. * include/bits/codecvt.h (codecvt_byname(const char*, size_t)): Use __builtin_strcmp. * include/bits/char_traits.h: Use __builtin_mem* everywhere. * include/bits/fstream.tcc (basic_filebuf<>::underflow, imbue): Use __builtin_memcpy and __builtin_memmove. * include/bits/locale_facets_nonio.h (moneypunct_byname(const char*, size_t __refs)): Use __builtin_strcmp. * include/std/bitset (bitset<>::_M_do_reset): Use __builtin_memset. * config/locale/gnu/c_locale.h: Use __builtin_strlen, __builtin_strcmp, and __builtin_memcpy. * config/locale/gnu/messages_members.h: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/c_locale.h: Likewise. * config/locale/generic/messages_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. * config/os/gnu-linux/ctype_noninline.h: Likewise, avoid strdup. * config/os/tpf/ctype_noninline.h: Likewise. * config/locale/generic/codecvt_members.cc: Include <cstring>. * config/locale/generic/ctype_members.cc: Likewise. * config/locale/generic/collate_members.cc: Likewise. * config/locale/gnu/c++locale_internal.h: Likewise. * config/locale/darwin/ctype_members.cc: Likewise. * src/ctype.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-1.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-2.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-1.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-2.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise. * config/locale/gnu/messages_members.cc: Avoid strdup. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.cc: Likewise. * config/locale/gnu/time_members.cc: Likewise. * config/locale/generic/c_locale.cc: Likewise. From-SVN: r124623
2007-05-11 20:58:08 +02:00
__ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0;
return __ret;
}
void
_M_replace_categories(const _Impl*, category);
void
_M_replace_category(const _Impl*, const locale::id* const*);
void
_M_replace_facet(const _Impl*, const locale::id*);
void
_M_install_facet(const locale::id*, const facet*);
template<typename _Facet>
void
_M_init_facet(_Facet* __facet)
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
{ _M_install_facet(&_Facet::id, __facet); }
New std::string implementation. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-12-19 19:16:39 +01:00
template<typename _Facet>
void
_M_init_facet_unchecked(_Facet* __facet)
{
__facet->_M_add_reference();
_M_facets[_Facet::id._M_id()] = __facet;
}
ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use _M_getloc. (num_put::_M_convert_float): Use. 2003-06-26 Benjamin Kosnik <bkoz@redhat.com> Jerry Quinn <jlquinn@optonline.net> * config/linker-map.gnu: Add __numpunct_cache. * config/locale/gnu/numeric_members.cc (numpunct::_M_initialize_numpunct): Account for _M_data, fill in all elements for "C" locale. (numpunct::~numpunct): Delete _M_data. * config/locale/generic/numeric_members.cc: Same. * include/bits/basic_ios.tcc (basic_ios::init): Remove __locale_cache bits. (basic_ios::_M_cache_locale): Same. * include/bits/ios_base.h: Same. Tweaks. * include/bits/locale_classes.h: Tweaks. Reorder classes. (__use_cache): Make friends with _Impl, locale. (_Impl::_M_caches): Add. (_Impl::_M_install_cache): Add. * include/bits/locale_facets.h (__numpunct_cache): New. (numpunct): Encapsulate data members in __numpunct_cache member, _M_data. Adjust virtuals. (numpunct::numpunct): New ctor for the same. (__locale_cache_base): Remove. (__locale_cache): Remove. * include/bits/locale_facets.tcc (__use_cache): New function, specializations. (num_put::_M_convert_int, _M_convert_float, do_put): Use it. * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w. * src/ios.cc (ios_base::ios_base): Remove __locale_cache. * src/locale-inst.cc: Same. Add __numpunct_cache. * src/locale.cc: Tweak inlines. (__use_cache): Define specializations. * src/localename.cc: Use global bits. (_Impl::~Impl): Deal with __numpunct_cache destruction. (_Impl::_Impl): Same. Pre-cache standard numpunct facets. (_Impl::_M_init_facet): Take into account __numpunct_cache. * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. Co-Authored-By: Jerry Quinn <jlquinn@optonline.net> From-SVN: r68558
2003-06-27 09:25:38 +02:00
void
_M_install_cache(const facet*, size_t);
New std::string implementation. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-12-19 19:16:39 +01:00
void _M_init_extra(facet**);
void _M_init_extra(void*, void*, const char*, const char*);
};
/**
* @brief Facet for localized string comparison.
*
* This facet encapsulates the code to compare strings in a localized
* manner.
*
* The collate template uses protected virtual functions to provide
* the actual results. The public accessors forward the call to
* the virtual functions. These virtual functions are hooks for
* developers to implement the behavior they require from the
* collate facet.
*/
template<typename _CharT>
New std::string implementation. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-12-19 19:16:39 +01:00
class _GLIBCXX_NAMESPACE_CXX11 collate : public locale::facet
{
public:
// Types:
//@{
/// Public typedefs
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
//@}
protected:
// Underlying "C" library locale information saved from
// initialization, needed by collate_byname as well.
__c_locale _M_c_locale_collate;
public:
/// Numpunct facet id.
static locale::id id;
/**
* @brief Constructor performs initialization.
*
* This is the constructor provided by the standard.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __refs Passed to the base facet class.
*/
explicit
collate(size_t __refs = 0)
: facet(__refs), _M_c_locale_collate(_S_get_c_locale())
{ }
/**
* @brief Internal constructor. Not for general use.
*
* This is a constructor for use by the library itself to set up new
* locales.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __cloc The C locale.
* @param __refs Passed to the base facet class.
*/
explicit
collate(__c_locale __cloc, size_t __refs = 0)
: facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
{ }
/**
* @brief Compare two strings.
*
* This function compares two strings and returns the result by calling
* collate::do_compare().
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __lo1 Start of string 1.
* @param __hi1 End of string 1.
* @param __lo2 Start of string 2.
* @param __hi2 End of string 2.
* @return 1 if string1 > string2, -1 if string1 < string2, else 0.
*/
int
compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const
{ return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
/**
* @brief Transform string to comparable form.
*
* This function is a wrapper for strxfrm functionality. It takes the
* input string and returns a modified string that can be directly
re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/42460 * doc/doxygen/user.cfg.in: Update file list. * include/debug/safe_sequence.h: Doxygen markup fixes for '' and "". * include/debug/safe_base.h: Same. * include/debug/macros.h: Same. * include/tr1_impl/regex: Same. * include/std/iostream: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/iosfwd: Same. * include/std/limits: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/for_each.h: Same. * include/parallel/workstealing.h: Same. * include/parallel/omp_loop_static.h: Same. * include/parallel/omp_loop.h: Same. * include/c_std/csignal: Same. * include/c_std/cstdlib: Same. * include/c_std/cstdio: Same. * include/c_std/cstdarg: Same. * include/c_std/cctype: Same. * include/c_std/cerrno: Same. * include/c_std/cmath: Same. * include/c_std/ciso646: Same. * include/c_std/ctime: Same. * include/c_std/clocale: Same. * include/c_std/climits: Same. * include/c_std/cassert: Same. * include/c_std/csetjmp: Same. * include/c_std/cwchar: Same. * include/c_std/cfloat: Same. * include/c_std/cstring: Same. * include/c_std/cstddef: Same. * include/c_std/cwctype: Same. * include/profile/iterator_tracker.h: Same. * include/profile/impl/profiler_trace.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/detail/pat_trie_/pat_trie_.h.pp: Same. * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.h.pp: Same. * include/ext/pb_ds/detail/type_utils.hpp: Same. * include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp: Same * include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp: Same. * include/ext/rc_string_base.h: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/functional: Same. * include/ext/mt_allocator.h: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: 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/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/random.tcc: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/random.h: Same. * include/bits/allocator.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/c_global/csignal: Same. * include/c_global/cstdlib: Same. * include/c_global/cstdio: Same. * include/c_global/cstdarg: Same. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cmath: Same. * include/c_global/ciso646: Same. * include/c_global/ctime: Same. * include/c_global/clocale: Same. * include/c_global/climits: Same. * include/c_global/cassert: Same. * include/c_global/csetjmp: Same. * include/c_global/cwchar: Same. * include/c_global/cfloat: Same. * include/c_global/cstring: Same. * include/c_global/cstddef: Same. * include/c_global/cwctype: Same. * include/tr1/hypergeometric.tcc: Same. * include/tr1/random.tcc: Same. * include/tr1/functional: Same. * include/tr1/random.h: Same. * include/backward/auto_ptr.h: Same. * include/backward/binders.h: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r156502
2010-02-04 19:20:34 +01:00
* compared to other transformed strings. In the C locale, this
* function just returns a copy of the input string. In some other
* locales, it may replace two chars with one, change a char for
* another, etc. It does so by returning collate::do_transform().
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __lo Start of string.
* @param __hi End of string.
* @return Transformed string_type.
*/
string_type
transform(const _CharT* __lo, const _CharT* __hi) const
{ return this->do_transform(__lo, __hi); }
/**
* @brief Return hash of a string.
*
* This function computes and returns a hash on the input string. It
* does so by returning collate::do_hash().
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __lo Start of string.
* @param __hi End of string.
* @return Hash value.
*/
long
hash(const _CharT* __lo, const _CharT* __hi) const
{ return this->do_hash(__lo, __hi); }
// Used to abstract out _CharT bits in virtual member functions, below.
int
_M_compare(const _CharT*, const _CharT*) const throw();
size_t
_M_transform(_CharT*, const _CharT*, size_t) const throw();
protected:
/// Destructor.
virtual
~collate()
{ _S_destroy_c_locale(_M_c_locale_collate); }
/**
* @brief Compare two strings.
*
* This function is a hook for derived classes to change the value
* returned. @see compare().
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __lo1 Start of string 1.
* @param __hi1 End of string 1.
* @param __lo2 Start of string 2.
* @param __hi2 End of string 2.
* @return 1 if string1 > string2, -1 if string1 < string2, else 0.
*/
virtual int
do_compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const;
/**
* @brief Transform string to comparable form.
*
* This function is a hook for derived classes to change the value
* returned.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __lo Start.
* @param __hi End.
* @return transformed string.
*/
virtual string_type
do_transform(const _CharT* __lo, const _CharT* __hi) const;
/**
* @brief Return hash of a string.
*
* This function computes and returns a hash on the input string. This
* function is a hook for derived classes to change the value returned.
*
user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-06 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Add scoped_allocator. * include/debug/safe_sequence.h: Fix doxygen markup. * include/debug/safe_unordered_base.h: Same. * include/debug/safe_local_iterator.tcc: Same. * include/debug/safe_unordered_container.h: Same. * include/std/valarray: Same. * include/std/iomanip: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/scoped_allocator: Same. * include/std/sstream: Same. * include/parallel/multiway_merge.h: Same. * include/parallel/base.h: Same. * include/parallel/for_each_selectors.h: Same. * include/parallel/multiway_mergesort.h: Same. * include/parallel/search.h: Same. * include/parallel/partial_sum.h: Same. * include/parallel/queue.h: Same. * include/parallel/sort.h: Same. * include/parallel/random_number.h: Same. * include/ext/vstring.h: Same. * include/ext/algorithm: Same. * include/ext/pb_ds/assoc_container.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/memory: Same. * include/ext/functional: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: 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_heap.h: Same. * include/bits/forward_list.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/codecvt.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ptr_traits.h: Same. * include/bits/slice_array.h: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/regex.h: Same. * include/bits/range_access.h: Same. * include/bits/random.h: Same. * include/bits/alloc_traits.h: Same. * include/bits/regex_error.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/bits/stl_relops.h: Same. * include/backward/auto_ptr.h: Same. * libsupc++/initializer_list: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Same. From-SVN: r177542
2011-08-07 09:27:06 +02:00
* @param __lo Start of string.
* @param __hi End of string.
* @return Hash value.
*/
virtual long
do_hash(const _CharT* __lo, const _CharT* __hi) const;
};
template<typename _CharT>
locale::id collate<_CharT>::id;
// Specializations.
template<>
int
collate<char>::_M_compare(const char*, const char*) const throw();
template<>
size_t
collate<char>::_M_transform(char*, const char*, size_t) const throw();
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
int
collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw();
template<>
size_t
collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const throw();
#endif
run_doxygen: Remove html_output_dir. 2008-03-25 Benjamin Kosnik <bkoz@redhat.com> * scripts/run_doxygen: Remove html_output_dir. Downgrade to Doxygen 1.5.1. * doc/doxygen/style.css: Delete. * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.5.1. (INPUT): Update. (PREDEFINED): Update. (HTML_OUTPUT): Remove html_output_dir, use html. (HTML_STYLESHEET): Remove style.css. * doc/doxygen/tables.html: Remove style.css use. * doc/doxygen/mainpage.html: Nested lists for Namespaces and Classes. * doc/doxygen/doxygroups.cc: Namespace edits. * doc/doxygen/Intro.3: Correct typo. * doc/xml/api.xml: Add gcc-4.3 links. * doc/html/api.html: Regenerate. * include/debug/debug.h: Document namepaces here. * include/parallel/base.h: Same. * include/ext/typelist.h: Same. * include/ext/pb_ds/tag_and_trait.hpp: Same. * include/tr1_impl/random: Adjust line break. * include/tr1_impl/unordered_map: Correct and or add markup. * include/tr1_impl/boost_shared_ptr.h: Correct and or add markup. * include/tr1_impl/functional_hash.h: Same. * include/tr1_impl/cmath: Same. * include/tr1_impl/functional: Same. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/complex: Same. * include/tr1_impl/type_traits: Same. * include/tr1_impl/regex: Same. * include/tr1_impl/array: Same. * include/std/tuple: Same. * include/std/date_time: Same. * include/std/system_error: Same. * include/std/type_traits: Same. * include/ext/enc_filebuf.h: Same. * include/ext/throw_allocator.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/concurrence.h: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/array_allocator.h: Same. * include/ext/mt_allocator.h: Same. * include/bits/locale_classes.h: Same. * include/bits/locale_facets.h: Same. * include/bits/codecvt.h: Same. * include/bits/char_traits.h: Same. * include/bits/allocator.h: Same. * include/bits/locale_facets_nonio.h: Same. * include/tr1/poly_laguerre.tcc: Same. * include/tr1/riemann_zeta.tcc: Same. * include/tr1/beta_function.tcc: Same. * include/tr1/tuple: Same. * include/tr1/exp_integral.tcc: Same. * include/tr1/gamma.tcc: Same. * include/tr1/hypergeometric.tcc: Same. * include/tr1/modified_bessel_func.tcc: Same. * include/tr1/legendre_function.tcc: Same. * include/tr1/type_traits: Same. * include/tr1/special_function_util.h: Same. * include/tr1/bessel_function.tcc: Same. * include/tr1/cmath: Same. * include/tr1/poly_hermite.tcc: Same. * include/tr1/ell_integral.tcc: Same. * config/abi/compatibility.h: Adjust file name. * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust line numbers. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. From-SVN: r133544
2008-03-26 07:27:35 +01:00
/// class collate_byname [22.2.4.2].
template<typename _CharT>
New std::string implementation. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-12-19 19:16:39 +01:00
class _GLIBCXX_NAMESPACE_CXX11 collate_byname : public collate<_CharT>
{
public:
//@{
/// Public typedefs
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
//@}
explicit
collate_byname(const char* __s, size_t __refs = 0)
: collate<_CharT>(__refs)
{
pod_char_traits.h (char_traits<>::move): Use __builtin_memmove. 2007-05-11 Paolo Carlini <pcarlini@suse.de> * include/ext/pod_char_traits.h (char_traits<>::move): Use __builtin_memmove. * include/bits/locale_classes.h (locale::_Impl::_M_check_same_name, collate_byname(const char*, size_t)): Use __builtin_strcmp. * include/bits/locale_facets.h: Use __builtin_mem* and __builtin_str* everywhere. * include/bits/codecvt.h (codecvt_byname(const char*, size_t)): Use __builtin_strcmp. * include/bits/char_traits.h: Use __builtin_mem* everywhere. * include/bits/fstream.tcc (basic_filebuf<>::underflow, imbue): Use __builtin_memcpy and __builtin_memmove. * include/bits/locale_facets_nonio.h (moneypunct_byname(const char*, size_t __refs)): Use __builtin_strcmp. * include/std/bitset (bitset<>::_M_do_reset): Use __builtin_memset. * config/locale/gnu/c_locale.h: Use __builtin_strlen, __builtin_strcmp, and __builtin_memcpy. * config/locale/gnu/messages_members.h: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/c_locale.h: Likewise. * config/locale/generic/messages_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. * config/os/gnu-linux/ctype_noninline.h: Likewise, avoid strdup. * config/os/tpf/ctype_noninline.h: Likewise. * config/locale/generic/codecvt_members.cc: Include <cstring>. * config/locale/generic/ctype_members.cc: Likewise. * config/locale/generic/collate_members.cc: Likewise. * config/locale/gnu/c++locale_internal.h: Likewise. * config/locale/darwin/ctype_members.cc: Likewise. * src/ctype.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-1.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-2.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-1.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-2.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise. * config/locale/gnu/messages_members.cc: Avoid strdup. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.cc: Likewise. * config/locale/gnu/time_members.cc: Likewise. * config/locale/generic/c_locale.cc: Likewise. From-SVN: r124623
2007-05-11 20:58:08 +02:00
if (__builtin_strcmp(__s, "C") != 0
&& __builtin_strcmp(__s, "POSIX") != 0)
{
this->_S_destroy_c_locale(this->_M_c_locale_collate);
this->_S_create_c_locale(this->_M_c_locale_collate, __s);
}
}
#if __cplusplus >= 201103L
explicit
collate_byname(const string& __s, size_t __refs = 0)
: collate_byname(__s.c_str(), __refs) { }
#endif
protected:
virtual
~collate_byname() { }
};
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
# include <bits/locale_classes.tcc>
#endif