string-inst.cc revision 107606
197403Sobrien// Components for manipulating sequences of characters -*- C++ -*-
297403Sobrien
397403Sobrien// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
497403Sobrien// Free Software Foundation, Inc.
597403Sobrien//
697403Sobrien// This file is part of the GNU ISO C++ Library.  This library is free
797403Sobrien// software; you can redistribute it and/or modify it under the
897403Sobrien// terms of the GNU General Public License as published by the
997403Sobrien// Free Software Foundation; either version 2, or (at your option)
1097403Sobrien// any later version.
1197403Sobrien
1297403Sobrien// This library is distributed in the hope that it will be useful,
1397403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of
1497403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1597403Sobrien// GNU General Public License for more details.
1697403Sobrien
1797403Sobrien// You should have received a copy of the GNU General Public License along
1897403Sobrien// with this library; see the file COPYING.  If not, write to the Free
1997403Sobrien// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2097403Sobrien// USA.
2197403Sobrien
2297403Sobrien// As a special exception, you may use this file as part of a free software
2397403Sobrien// library without restriction.  Specifically, if other files instantiate
2497403Sobrien// templates or use macros or inline functions from this file, or you compile
25107606Sobrien// this file and link it with other files to produce an executable, this
26107606Sobrien// file does not by itself cause the resulting executable to be covered by
2797403Sobrien// the GNU General Public License.  This exception does not however
2897403Sobrien// invalidate any other reasons why the executable file might be covered by
2997403Sobrien// the GNU General Public License.
3097403Sobrien
3197403Sobrien//
3297403Sobrien// ISO C++ 14882: 21  Strings library
3397403Sobrien//
3497403Sobrien
3597403Sobrien// Written by Jason Merrill based upon the specification by Takanori Adachi
3697403Sobrien// in ANSI X3J16/94-0013R2.  Rewritten by Nathan Myers.
3797403Sobrien
3897403Sobrien#include <string>
3997403Sobrien
4097403Sobrien// Instantiation configuration.
4197403Sobrien#ifndef C
4297403Sobrien# define C char
4397403Sobrien#endif
4497403Sobrien
4597403Sobriennamespace std
4697403Sobrien{
4797403Sobrien  typedef basic_string<C> S;
4897403Sobrien
4997403Sobrien  template class basic_string<C>;
5097403Sobrien  template S operator+(const C*, const S&);
5197403Sobrien  template S operator+(C, const S&);
52107606Sobrien  template S operator+(const S&, const S&);
5397403Sobrien} // namespace std
5497403Sobrien
5597403Sobriennamespace __gnu_cxx
5697403Sobrien{
5797403Sobrien  using std::S;
5897403Sobrien  template bool operator==(const S::iterator&, const S::iterator&);
5997403Sobrien  template bool operator==(const S::const_iterator&, const S::const_iterator&);
6097403Sobrien}
6197403Sobrien
6297403Sobriennamespace std
6397403Sobrien{
6497403Sobrien  // Only one template keyword allowed here.
6597403Sobrien  // See core issue #46 (NAD)
6697403Sobrien  // http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46
6797403Sobrien  template
6897403Sobrien    S::basic_string(C*, C*, const allocator<C>&);
6997403Sobrien
7097403Sobrien  template
7197403Sobrien    S::basic_string(const C*, const C*, const allocator<C>&);
7297403Sobrien
7397403Sobrien  template
7497403Sobrien    S::basic_string(S::iterator, S::iterator, const allocator<C>&);
7597403Sobrien
7697403Sobrien  template
7797403Sobrien    S::basic_string(S::const_iterator, S::const_iterator, const allocator<C>&);
7897403Sobrien
7997403Sobrien  template
8097403Sobrien    S&
8197403Sobrien    S::_M_replace(S::iterator, S::iterator, S::iterator, S::iterator,
8297403Sobrien		  input_iterator_tag);
8397403Sobrien
8497403Sobrien  template
8597403Sobrien    S&
8697403Sobrien    S::_M_replace(S::iterator, S::iterator, S::const_iterator,
8797403Sobrien		  S::const_iterator, input_iterator_tag);
8897403Sobrien
8997403Sobrien  template
9097403Sobrien    S&
9197403Sobrien    S::_M_replace(S::iterator, S::iterator, C*, C*, input_iterator_tag);
9297403Sobrien
9397403Sobrien  template
9497403Sobrien    S&
9597403Sobrien    S::_M_replace(S::iterator, S::iterator, const C*, const C*,
9697403Sobrien		  input_iterator_tag);
9797403Sobrien
9897403Sobrien  template
9997403Sobrien    S&
10097403Sobrien    S::_M_replace_safe(S::iterator, S::iterator, S::iterator, S::iterator);
10197403Sobrien
10297403Sobrien  template
10397403Sobrien    S&
10497403Sobrien    S::_M_replace_safe(S::iterator, S::iterator, S::const_iterator,
10597403Sobrien		  S::const_iterator);
10697403Sobrien
10797403Sobrien  template
10897403Sobrien    S&
10997403Sobrien    S::_M_replace_safe(S::iterator, S::iterator, C*, C*);
11097403Sobrien
11197403Sobrien  template
11297403Sobrien    S&
11397403Sobrien    S::_M_replace_safe(S::iterator, S::iterator, const C*, const C*);
11497403Sobrien
11597403Sobrien  template
11697403Sobrien    C*
11797403Sobrien    S::_S_construct(S::iterator, S::iterator,
11897403Sobrien		    const allocator<C>&, forward_iterator_tag);
11997403Sobrien
12097403Sobrien  template
12197403Sobrien    C*
12297403Sobrien    S::_S_construct(S::const_iterator, S::const_iterator,
12397403Sobrien		    const allocator<C>&, forward_iterator_tag);
12497403Sobrien
12597403Sobrien  template
12697403Sobrien    C*
12797403Sobrien    S::_S_construct(C*, C*, const allocator<C>&, forward_iterator_tag);
12897403Sobrien
12997403Sobrien  template
13097403Sobrien    C*
13197403Sobrien    S::_S_construct(const C*, const C*, const allocator<C>&,
13297403Sobrien		    forward_iterator_tag);
13397403Sobrien
13497403Sobrien  template
13597403Sobrien    void
13697403Sobrien    __destroy_aux<S*>(S*, S*, __false_type);
13797403Sobrien} // namespace std
138