aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2001-01-04 04:21:42 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2001-01-04 04:21:42 +0000
commite61c3e8cde7eaa6875d5f60862d071ad7dd14ce7 (patch)
treefc45e0f676e408a7d52afccee088ae3290c00e82
parent584ef5fea573e2e0966c068ec8c5dd6dce493663 (diff)
downloadgcc-e61c3e8cde7eaa6875d5f60862d071ad7dd14ce7.zip
gcc-e61c3e8cde7eaa6875d5f60862d071ad7dd14ce7.tar.gz
gcc-e61c3e8cde7eaa6875d5f60862d071ad7dd14ce7.tar.bz2
std_cwctype.h: Include std_cwchar.h for wint_t.
2001-01-03 Benjamin Kosnik <bkoz@redhat.com> * include/c_std/bits/std_cwctype.h: Include std_cwchar.h for wint_t. * testsuite/17_intro/header_cwctype.cc (main): New file. * src/Makefile.am (base_headers): Change. * include/bits/std_string.h: And here. * include/bits/string.tcc: Tweaks, move to... * include/bits/basic_string.tcc: ...Here. * src/string-inst.cc: Simplify, just instantiate the whole class, not member-by-member. From-SVN: r38679
-rw-r--r--libstdc++-v3/ChangeLog12
-rw-r--r--libstdc++-v3/include/bits/basic_string.tcc (renamed from libstdc++-v3/include/bits/string.tcc)3
-rw-r--r--libstdc++-v3/include/bits/std_string.h4
-rw-r--r--libstdc++-v3/include/c_std/bits/std_cwctype.h4
-rw-r--r--libstdc++-v3/src/Makefile.am4
-rw-r--r--libstdc++-v3/src/Makefile.in2
-rw-r--r--libstdc++-v3/src/string-inst.cc200
7 files changed, 35 insertions, 194 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 44adda7..7c644af 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,15 @@
+2001-01-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/c_std/bits/std_cwctype.h: Include std_cwchar.h for wint_t.
+ * testsuite/17_intro/header_cwctype.cc (main): New file.
+
+ * src/Makefile.am (base_headers): Change.
+ * include/bits/std_string.h: And here.
+ * include/bits/string.tcc: Tweaks, move to...
+ * include/bits/basic_string.tcc: ...Here.
+ * src/string-inst.cc: Simplify, just instantiate the whole class,
+ not member-by-member.
+
2001-01-02 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_ENABLD_CSTDIO): Add in default value.
diff --git a/libstdc++-v3/include/bits/string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index da43ae1..a9ac2c9 100644
--- a/libstdc++-v3/include/bits/string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 2000, 1999, 1998, 1997 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -42,7 +42,6 @@
namespace std
{
-
template<typename _CharT, typename _Traits, typename _Alloc>
const _CharT
basic_string<_CharT, _Traits, _Alloc>::
diff --git a/libstdc++-v3/include/bits/std_string.h b/libstdc++-v3/include/bits/std_string.h
index 6008eca..eb023df 100644
--- a/libstdc++-v3/include/bits/std_string.h
+++ b/libstdc++-v3/include/bits/std_string.h
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -44,7 +44,7 @@
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
# include <bits/std_algorithm.h> // for find_if
-# include <bits/string.tcc>
+# include <bits/basic_string.tcc>
#endif
#endif /* _CPP_STRING */
diff --git a/libstdc++-v3/include/c_std/bits/std_cwctype.h b/libstdc++-v3/include/c_std/bits/std_cwctype.h
index fda9f45..9544a82 100644
--- a/libstdc++-v3/include/c_std/bits/std_cwctype.h
+++ b/libstdc++-v3/include/c_std/bits/std_cwctype.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -36,6 +36,8 @@
#ifndef _CPP_CWCTYPE
#define _CPP_CWCTYPE 1
+#include <bits/std_cwchar.h>
+
#pragma GCC system_header
#include <wctype.h>
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 9809dd6..18acebe 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -21,7 +21,7 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-## $Id: Makefile.am,v 1.60 2000/12/21 01:28:57 gdr Exp $
+## $Id: Makefile.am,v 1.61 2000/12/23 07:13:57 bkoz Exp $
AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1
@@ -76,7 +76,7 @@ INCLUDES = \
base_headers = \
bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h \
- bits/basic_string.h bits/std_string.h bits/string.tcc \
+ bits/std_string.h bits/basic_string.h bits/basic_string.tcc \
bits/generic_shadow.h bits/std_utility.h \
bits/std_complex.h \
bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h \
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 6b9cc03..cdb547ce 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -148,7 +148,7 @@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = -nostdinc++ -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) $(TOPLEVEL_INCLUDES)
-base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/basic_string.h bits/std_string.h bits/string.tcc bits/generic_shadow.h bits/std_utility.h bits/std_complex.h bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h bits/gslice.h bits/gslice_array.h bits/indirect_array.h bits/exception_support.h bits/std_fstream.h bits/std_iomanip.h bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h bits/std_istream.h bits/istream.tcc bits/std_locale.h bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h bits/streambuf.tcc bits/basic_file.h bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h bits/stl_pthread_alloc.h bits/pthread_allocimpl.h bits/stl_threads.h bits/stl_iterator_base.h bits/std_bitset.h bits/std_deque.h bits/std_functional.h bits/std_iterator.h bits/std_list.h bits/std_map.h bits/std_memory.h bits/std_numeric.h bits/std_queue.h bits/std_set.h bits/std_stack.h bits/std_stdexcept.h bits/std_vector.h bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h bits/stl_deque.h bits/stl_function.h bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_string_fwd.h bits/stl_tempbuf.h bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h bits/type_traits.h bits/stl_range_errors.h bits/std_algorithm.h bits/concept_checks.h bits/container_concepts.h bits/sequence_concepts.h bits/stl_config.h bits/stl_construct.h
+base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/std_string.h bits/basic_string.h bits/basic_string.tcc bits/generic_shadow.h bits/std_utility.h bits/std_complex.h bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h bits/gslice.h bits/gslice_array.h bits/indirect_array.h bits/exception_support.h bits/std_fstream.h bits/std_iomanip.h bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h bits/std_istream.h bits/istream.tcc bits/std_locale.h bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h bits/streambuf.tcc bits/basic_file.h bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h bits/stl_pthread_alloc.h bits/pthread_allocimpl.h bits/stl_threads.h bits/stl_iterator_base.h bits/std_bitset.h bits/std_deque.h bits/std_functional.h bits/std_iterator.h bits/std_list.h bits/std_map.h bits/std_memory.h bits/std_numeric.h bits/std_queue.h bits/std_set.h bits/std_stack.h bits/std_stdexcept.h bits/std_vector.h bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h bits/stl_deque.h bits/stl_function.h bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_string_fwd.h bits/stl_tempbuf.h bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h bits/type_traits.h bits/stl_range_errors.h bits/std_algorithm.h bits/concept_checks.h bits/container_concepts.h bits/sequence_concepts.h bits/stl_config.h bits/stl_construct.h
backward_headers = backward/complex.h backward/iomanip.h backward/istream.h backward/ostream.h backward/stream.h backward/streambuf.h backward/algo.h backward/algobase.h backward/alloc.h backward/bvector.h backward/defalloc.h backward/deque.h backward/function.h backward/hash_map.h backward/hash_set.h backward/hashtable.h backward/heap.h backward/iterator.h backward/list.h backward/map.h backward/multimap.h backward/new.h backward/multiset.h backward/pair.h backward/iostream.h backward/rope.h backward/set.h backward/slist.h backward/stack.h backward/tempbuf.h backward/tree.h backward/vector.h backward/fstream.h backward/strstream.h backward/strstream
diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc
index 2555011..54e5f4a 100644
--- a/libstdc++-v3/src/string-inst.cc
+++ b/libstdc++-v3/src/string-inst.cc
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 2000, 1999, 1998, 1997 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -35,128 +35,31 @@
// in ANSI X3J16/94-0013R2. Rewritten by Nathan Myers.
#include <bits/std_string.h>
-#include <bits/std_algorithm.h>
// Instantiation configuration.
#ifndef C
# define C char
-# define _GLIBCPP_INSTANTIATING_CHAR 1
#endif
namespace std
{
typedef basic_string<C> S;
- template C S::_Rep::_S_terminal;
- template const S::size_type S::npos;
- template S::size_type S::_Rep::_S_max_size;
- template S::size_type S::_S_empty_rep_storage[];
- template S::_Rep* S::_Rep::_S_create(size_t, S::allocator_type const&);
- template void S::_Rep::_M_destroy(const S::allocator_type&) throw();
- template void __destroy_aux(S*, S*, __false_type);
+ template class basic_string<C>;
- template S::basic_string(S const&);
-
- template
- S::basic_string(S::size_type, C, const S::allocator_type&);
-
- template
- S::basic_string(const S::allocator_type&);
-
- template
- S::basic_string(const S&, S::size_type, S::size_type);
-
- template
- S::basic_string(const S&, S::size_type, S::size_type,
- const S::allocator_type&);
-
- template
- S::basic_string(C const*, S::size_type, const S::allocator_type&);
-
- template
- S::basic_string(C const*, S::allocator_type const&);
-
- template
- S::basic_string(C*, C*, const allocator<C>&);
-
- template
- S::basic_string(S::iterator, S::iterator, const allocator<C>&);
-
- template
- void S::_M_leak_hard();
-
- template
- void S::_M_mutate(S::size_type, S::size_type, S::size_type);
-
- template
- C* S::_Rep::_M_clone(S::allocator_type const&, S::size_type);
-
- template
- void S::reserve(S::size_type);
-
- template
- void S::swap(S&);
-
-# ifdef _GLIBCPP_ALLOC_CONTROL
- template
- bool (* S::_Rep::_S_excess_slop)(size_t, size_t);
-
- template
- bool S::_Rep::_S_default_excess(size_t, size_t);
-# endif
-
- template
- void S::resize(S::size_type, C);
-
- template
- S& S::append(S const&);
-
- template
- S& S::append(S const&, S::size_type, S::size_type);
-
- template
- S& S::append(C const*, S::size_type);
-
- template
- S& S::append(S::size_type, C);
-
- template
- S&
- S::append<S::iterator>(S::iterator, S::iterator);
-
- template
- S&
- S::assign(S const&);
-
- template
- S&
- S::assign<S::iterator>(S::iterator, S::iterator);
-
- template
- void
- S::insert<S::iterator> //c*
- (S::iterator, S::iterator, S::iterator); //it, c+, c+ and temptype = char*
-
- template
- S& S::replace(S::size_type, S::size_type, S const&,
- S::size_type, S::size_type);
-
- template
- S& S::replace(S::iterator, S::iterator, S::size_type, C);
-
- template
- S&
- S::replace<S::iterator> // c*
- (S::iterator, S::iterator, S::iterator, S::iterator); //it, it, c+, c+
+ template S operator+(const C*, const S&);
+ template S operator+(C, const S&);
+ template bool operator==(const S::iterator&, const S::iterator&);
+ template bool operator==(const S::const_iterator&, const S::const_iterator&);
+ // Only one template keyword allowed here.
+ // See core issue #46 (NAD)
+ // http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46
template
S&
S::_M_replace<S::iterator>
(S::iterator, S::iterator, S::iterator, S::iterator, forward_iterator_tag);
- // Only one template keyword allowed here.
- // See core issue #46 (NAD)
- // http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46
template
S&
S::_M_replace<S::const_iterator>
@@ -164,88 +67,13 @@ namespace std
S::const_iterator, S::const_iterator, forward_iterator_tag);
template
- S&
- S::_M_replace<C*>
- (S::iterator, S::iterator, C*, C*, forward_iterator_tag);
+ C*
+ S::_S_construct<S::iterator>
+ (S::iterator, S::iterator, const allocator<C>&, forward_iterator_tag);
template
- S&
- S::_M_replace<const C*>
- (S::iterator, S::iterator, const C*, const C*, forward_iterator_tag);
-
- template
- S::size_type S::copy(C*, S::size_type, S::size_type) const;
-
- template
- C* S::_S_construct<S::iterator>(S::iterator, S::iterator,
- const allocator<C>&);
-
- template
- C* S::_S_construct<S::iterator>(S::iterator, S::iterator,
- const allocator<C>&, forward_iterator_tag);
-
- template
- C* S::_S_construct<C*>(C*, C*, const allocator<C>&, forward_iterator_tag);
-
- template
- C* S::_S_construct<const C*>(const C*, const C*, const allocator<C>&,
- forward_iterator_tag);
-
- template
- C* S::_S_construct(S::size_type, C, S::allocator_type const&);
-
- template
- const C* S::_S_find(const C* __beg, const C* __end, C __c);
-
- template
- S::size_type S::find(C, S::size_type) const;
-
- template
- S::size_type S::rfind(C const*, S::size_type, S::size_type) const;
-
- template
- S::size_type S::rfind(C, S::size_type) const;
-
- template
- S::size_type S::find_first_of(C const*, S::size_type, S::size_type) const;
-
- template
- S::size_type S::find_last_of(C const*, S::size_type, S::size_type) const;
-
- template
- S::size_type
- S::find_first_not_of(C const*, S::size_type, S::size_type) const;
-
- template
- S::size_type
- S::find_last_not_of(C const*, S::size_type, S::size_type) const;
-
- template
- S::size_type S::find_last_not_of(C, S::size_type) const;
-
- template
- int S::compare(S::size_type, S::size_type, S const&) const;
-
- template
- int S::compare(S::size_type, S::size_type, S const&, S::size_type,
- S::size_type) const;
-
- template
- int S::compare(C const*) const;
-
- template
- int S::compare(S::size_type, S::size_type, C const*, S::size_type) const;
-
- template S operator+(const C*, const S&);
-
- template S operator+(C, const S&);
-
- template bool operator==(const S::iterator&, const S::iterator&);
- template bool operator==(const S::const_iterator&, const S::const_iterator&);
-
- template void _S_string_copy(const S&, C*, allocator<C>::size_type);
-
-} // std
+ S::basic_string(S::iterator, S::iterator, const allocator<C>&);
+} // namespace std