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++ / cinst.cc < prev    next >
C/C++ Source or Header  |  1995-06-14  |  2KB  |  152 lines

  1. // Instantiation file for the -*- C++ -*- complex number classes.
  2. // Copyright (C) 1994 Free Software Foundation
  3.  
  4. #ifdef F
  5. typedef float f;
  6. #endif
  7. #ifdef D
  8. typedef double f;
  9. #endif
  10. #ifdef LD
  11. typedef long double f;
  12. #endif
  13.  
  14. #if defined (MAIN) && defined (__GNUG__)
  15. #ifdef F
  16. #pragma implementation "fcomplex"
  17. #endif
  18. #ifdef D
  19. #pragma implementation "dcomplex"
  20. #endif
  21. #ifdef LD
  22. #pragma implementation "ldcomplex"
  23. #endif
  24. #endif
  25.  
  26. #if 0
  27. #define _G_NO_EXTERN_TEMPLATES
  28. #endif
  29. #include <std/complext.cc>
  30.  
  31. typedef complex<f> c;
  32. typedef const c& ccr;
  33.  
  34. #ifdef MAIN
  35. template class complex<f>;
  36. #endif
  37.  
  38. #ifdef ADDCC
  39. template c operator+ (ccr, ccr);
  40. #endif
  41. #ifdef ADDCF
  42. template c operator+ (ccr, f);
  43. #endif
  44. #ifdef ADDFC
  45. template c operator+ (f, ccr);
  46. #endif
  47. #ifdef SUBCC
  48. template c operator- (ccr, ccr);
  49. #endif
  50. #ifdef SUBCF
  51. template c operator- (ccr, f);
  52. #endif
  53. #ifdef SUBFC
  54. template c operator- (f, ccr);
  55. #endif
  56. #ifdef MULCC
  57. template c operator* (ccr, ccr);
  58. #endif
  59. #ifdef MULCF
  60. template c operator* (ccr, f);
  61. #endif
  62. #ifdef MULFC
  63. template c operator* (f, ccr);
  64. #endif
  65. #ifdef DIVCC
  66. template c operator/ (ccr, ccr);
  67. #endif
  68. #ifdef DIVCF
  69. template c operator/ (ccr, f);
  70. #endif
  71. #ifdef DIVFC
  72. template c operator/ (f, ccr);
  73. #endif
  74. #ifdef PLUS
  75. template c operator+ (ccr);
  76. #endif
  77. #ifdef MINUS
  78. template c operator- (ccr);
  79. #endif
  80. #ifdef EQCC
  81. template bool operator== (ccr, ccr);
  82. #endif
  83. #ifdef EQCF
  84. template bool operator== (ccr, f);
  85. #endif
  86. #ifdef EQFC
  87. template bool operator== (f, ccr);
  88. #endif
  89. #ifdef NECC
  90. template bool operator!= (ccr, ccr);
  91. #endif
  92. #ifdef NECF
  93. template bool operator!= (ccr, f);
  94. #endif
  95. #ifdef NEFC
  96. template bool operator!= (f, ccr);
  97. #endif
  98. #ifdef ABS
  99. template f abs (ccr);
  100. #endif
  101. #ifdef ARG
  102. template f arg (ccr);
  103. #endif
  104. #ifdef POLAR
  105. template c polar (f, f);
  106. #endif
  107. #ifdef CONJ
  108. template c conj (ccr);
  109. #endif
  110. #ifdef NORM
  111. template f norm (ccr);
  112. #endif
  113. #ifdef COS
  114. template c cos (ccr);
  115. #endif
  116. #ifdef COSH
  117. template c cosh (ccr);
  118. #endif
  119. #ifdef EXP
  120. template c exp (ccr);
  121. #endif
  122. #ifdef LOG
  123. template c log (ccr);
  124. #endif
  125. #ifdef POWCC
  126. template c pow (ccr, ccr);
  127. #endif
  128. #ifdef POWCF
  129. template c pow (ccr, f);
  130. #endif
  131. #ifdef POWCI
  132. template c pow (ccr, int);
  133. #endif
  134. #ifdef POWFC
  135. template c pow (f, ccr);
  136. #endif
  137. #ifdef SIN
  138. template c sin (ccr);
  139. #endif
  140. #ifdef SINH
  141. template c sinh (ccr);
  142. #endif
  143. #ifdef SQRT
  144. template c sqrt (ccr);
  145. #endif
  146. #ifdef EXTRACT
  147. template istream& operator>> (istream&, complex<f>&);
  148. #endif
  149. #ifdef INSERT
  150. template ostream& operator<< (ostream&, complex<f>);
  151. #endif
  152.