string-inst.cc revision 97403
1// Components for manipulating sequences of characters -*- C++ -*-
2
3// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
4// Free Software Foundation, Inc.
5//
6// This file is part of the GNU ISO C++ Library.  This library is free
7// software; you can redistribute it and/or modify it under the
8// terms of the GNU General Public License as published by the
9// Free Software Foundation; either version 2, or (at your option)
10// any later version.
11
12// This library is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15// GNU General Public License for more details.
16
17// You should have received a copy of the GNU General Public License along
18// with this library; see the file COPYING.  If not, write to the Free
19// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20// USA.
21
22// As a special exception, you may use this file as part of a free software
23// library without restriction.  Specifically, if other files instantiate
24// templates or use macros or inline functions from this file, or you compile
25// this file and link it with other files to produce an executable, this// file does not by itself cause the resulting executable to be covered by
26// the GNU General Public License.  This exception does not however
27// invalidate any other reasons why the executable file might be covered by
28// the GNU General Public License.
29
30//
31// ISO C++ 14882: 21  Strings library
32//
33
34// Written by Jason Merrill based upon the specification by Takanori Adachi
35// in ANSI X3J16/94-0013R2.  Rewritten by Nathan Myers.
36
37#include <string>
38
39// Instantiation configuration.
40#ifndef C
41# define C char
42#endif
43
44namespace std
45{
46  typedef basic_string<C> S;
47
48  template class basic_string<C>;
49  template S operator+(const C*, const S&);
50  template S operator+(C, const S&);
51} // namespace std
52
53namespace __gnu_cxx
54{
55  using std::S;
56  template bool operator==(const S::iterator&, const S::iterator&);
57  template bool operator==(const S::const_iterator&, const S::const_iterator&);
58}
59
60namespace std
61{
62  // Only one template keyword allowed here.
63  // See core issue #46 (NAD)
64  // http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46
65  template
66    S::basic_string(C*, C*, const allocator<C>&);
67
68  template
69    S::basic_string(const C*, const C*, const allocator<C>&);
70
71  template
72    S::basic_string(S::iterator, S::iterator, const allocator<C>&);
73
74  template
75    S::basic_string(S::const_iterator, S::const_iterator, const allocator<C>&);
76
77  template
78    S&
79    S::_M_replace(S::iterator, S::iterator, S::iterator, S::iterator,
80		  input_iterator_tag);
81
82  template
83    S&
84    S::_M_replace(S::iterator, S::iterator, S::const_iterator,
85		  S::const_iterator, input_iterator_tag);
86
87  template
88    S&
89    S::_M_replace(S::iterator, S::iterator, C*, C*, input_iterator_tag);
90
91  template
92    S&
93    S::_M_replace(S::iterator, S::iterator, const C*, const C*,
94		  input_iterator_tag);
95
96  template
97    S&
98    S::_M_replace_safe(S::iterator, S::iterator, S::iterator, S::iterator);
99
100  template
101    S&
102    S::_M_replace_safe(S::iterator, S::iterator, S::const_iterator,
103		  S::const_iterator);
104
105  template
106    S&
107    S::_M_replace_safe(S::iterator, S::iterator, C*, C*);
108
109  template
110    S&
111    S::_M_replace_safe(S::iterator, S::iterator, const C*, const C*);
112
113  template
114    C*
115    S::_S_construct(S::iterator, S::iterator,
116		    const allocator<C>&, forward_iterator_tag);
117
118  template
119    C*
120    S::_S_construct(S::const_iterator, S::const_iterator,
121		    const allocator<C>&, forward_iterator_tag);
122
123  template
124    C*
125    S::_S_construct(C*, C*, const allocator<C>&, forward_iterator_tag);
126
127  template
128    C*
129    S::_S_construct(const C*, const C*, const allocator<C>&,
130		    forward_iterator_tag);
131
132  template
133    void
134    __destroy_aux<S*>(S*, S*, __false_type);
135} // namespace std
136