home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / libg++-2.7.1-base.tgz / libg++-2.7.1-src.tar / fsf / libg++ / libstdc++ / sinst.cc < prev    next >
C/C++ Source or Header  |  1995-06-16  |  4KB  |  148 lines

  1. // Instantiation file for the -*- C++ -*- string classes.
  2. // Copyright (C) 1994 Free Software Foundation
  3.  
  4. // This file is part of the GNU ANSI C++ Library.  This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 2, or (at your option)
  8. // any later version.
  9.  
  10. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this library; see the file COPYING.  If not, write to the Free
  17. // Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // As a special exception, if you link this library with files
  20. // compiled with a GNU compiler to produce an executable, this does not cause
  21. // the resulting executable to be covered by the GNU General Public License.
  22. // This exception does not however invalidate any other reasons why
  23. // the executable file might be covered by the GNU General Public License.
  24.  
  25. // Written by Jason Merrill based upon the specification by Takanori Adachi
  26. // in ANSI X3J16/94-0013R2.
  27.  
  28. #ifdef __GNUG__
  29. #ifdef TRAITS
  30. #ifdef C
  31. #pragma implementation "std/straits.h"
  32. #endif
  33. #endif
  34. #endif
  35.  
  36. #if 0
  37. #define _G_NO_EXTERN_TEMPLATES
  38. #endif
  39. #include <std/bastring.cc>
  40.  
  41. #ifdef C
  42. typedef char c;
  43. #endif
  44. #ifdef W
  45. typedef wchar_t c;
  46. #endif
  47.  
  48. #ifdef TRAITS
  49. template class string_char_traits <c>;
  50. #endif
  51.  
  52. #define STRING basic_string <c, string_char_traits <c> >
  53. typedef class STRING s;
  54. #define BSREP __bsrep <c, string_char_traits <c> >
  55. typedef class BSREP r;
  56.  
  57. #ifdef REP
  58. template class BSREP;
  59. r s::nilRep = { 0, 0, 1 };
  60. #ifdef _G_ALLOC_CONTROL
  61. bool (*r::excess_slop) (size_t, size_t) = r::default_excess;
  62. size_t (*r::frob_size) (size_t) = r::default_frob;
  63. #endif
  64. #endif
  65.  
  66. #ifdef MAIN
  67. template class STRING;
  68. #endif
  69.  
  70. #ifdef ADDSS
  71. template s operator+ (const s&, const s&);
  72. #endif
  73. #ifdef ADDPS
  74. template s operator+ (const c*, const s&);
  75. #endif
  76. #ifdef ADDCS
  77. template s operator+ (c, const s&);
  78. #endif
  79. #ifdef ADDSP
  80. template s operator+ (const s&, const c*);
  81. #endif
  82. #ifdef ADDSC
  83. template s operator+ (const s&, c);
  84. #endif
  85. #ifdef EQSS
  86. template bool operator== (const s&, const s&);
  87. #endif
  88. #ifdef EQPS
  89. template bool operator== (const c*, const s&);
  90. #endif
  91. #ifdef EQSP
  92. template bool operator== (const s&, const c*);
  93. #endif
  94. #ifdef NESS
  95. template bool operator!= (const s&, const s&);
  96. #endif
  97. #ifdef NEPS
  98. template bool operator!= (const c*, const s&);
  99. #endif
  100. #ifdef NESP
  101. template bool operator!= (const s&, const c*);
  102. #endif
  103. #ifdef LTSS
  104. template bool operator< (const s&, const s&);
  105. #endif
  106. #ifdef LTPS
  107. template bool operator< (const c*, const s&);
  108. #endif
  109. #ifdef LTSP
  110. template bool operator< (const s&, const c*);
  111. #endif
  112. #ifdef GTSS
  113. template bool operator> (const s&, const s&);
  114. #endif
  115. #ifdef GTPS
  116. template bool operator> (const c*, const s&);
  117. #endif
  118. #ifdef GTSP
  119. template bool operator> (const s&, const c*);
  120. #endif
  121. #ifdef LESS
  122. template bool operator<= (const s&, const s&);
  123. #endif
  124. #ifdef LEPS
  125. template bool operator<= (const c*, const s&);
  126. #endif
  127. #ifdef LESP
  128. template bool operator<= (const s&, const c*);
  129. #endif
  130. #ifdef GESS
  131. template bool operator>= (const s&, const s&);
  132. #endif
  133. #ifdef GEPS
  134. template bool operator>= (const c*, const s&);
  135. #endif
  136. #ifdef GESP
  137. template bool operator>= (const s&, const c*);
  138. #endif
  139. #ifdef EXTRACT
  140. template istream& operator>> (istream&, s&);
  141. #endif // EXTRACT
  142. #ifdef INSERT
  143. template ostream& operator<< (ostream&, const s&);
  144. #endif // INSERT
  145. #ifdef GETLINE
  146. template istream& getline (istream&, s&);
  147. #endif
  148.