home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / lib / g++-include / cinst.hi < prev    next >
Text File  |  1994-12-22  |  4KB  |  126 lines

  1. // Forward declarations of -*- C++ -*- complex number instantiations.
  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 GNU CC; see the file COPYING.  If not, write to
  17. // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, 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 in the 27 May 1994
  26. // C++ working paper, ANSI document X3J16/94-0098.
  27.  
  28. #ifndef _G_NO_EXTERN_TEMPLATES
  29. extern template class __complex<float>;
  30. extern template __complex<float> _float_complex (__complex<double>);
  31. extern template __complex<float> _float_complex (__complex<long double>);
  32. extern template class __complex<double>;
  33. extern template class __complex<long double>;
  34. #endif
  35.  
  36. #define __B(type) bool
  37. #define __C(type) __complex<type>
  38. #define __F(type) type
  39. #define __I(type) int
  40. #define __IS(type) istream&
  41. #define __OS(type) ostream&
  42. #define __CR(type) __complex<type>&
  43.  
  44. #define __D2(name,type,ret,arg1,arg2) ret(type) name (arg1(type), arg2(type));
  45.  
  46. #ifdef _G_NO_EXTERN_TEMPLATES
  47. #define __S1(name,type,ret,arg1)
  48. #define __S2(name,type,ret,arg1,arg2) __D2 (name,type,ret,arg1,arg2)
  49. #else
  50. #define __S1(name,type,ret,arg1) \
  51.   extern template ret(type) name (arg1(type));
  52. #define __S2(name,type,ret,arg1,arg2) \
  53.   __D2 (name,type,ret,arg1,arg2) \
  54.   extern template __D2 (name,type,ret,arg1,arg2)
  55. #endif
  56.  
  57. #define __DO1(name,ret,arg1) \
  58.   __S1(name,float,ret,arg1) \
  59.   __S1(name,double,ret,arg1) \
  60.   __S1(name,long double,ret,arg1)
  61. #define __DO2(name,ret,arg1,arg2) \
  62.   __S2(name,float,ret,arg1,arg2) \
  63.   __S2(name,double,ret,arg1,arg2) \
  64.   __S2(name,long double,ret,arg1,arg2)
  65. #define __DECL2(name,ret,arg1,arg2) \
  66.   __D2(name,float,ret,arg1,arg2) \
  67.   __D2(name,double,ret,arg1,arg2) \
  68.   __D2(name,long double,ret,arg1,arg2)
  69.  
  70. #define __DOCCC(name) __DO2(name,__C,__C,__C)
  71. #define __DOCCF(name) __DO2(name,__C,__C,__F)
  72. #define __DOCFC(name) __DO2(name,__C,__F,__C)
  73. #define __DOCFF(name) __DO2(name,__C,__F,__F)
  74. #define __DOBCC(name) __DO2(name,__B,__C,__C)
  75. #define __DOBCF(name) __DO2(name,__B,__C,__F)
  76. #define __DOBFC(name) __DO2(name,__B,__F,__C)
  77. #define __DOFC(name) __DO1(name,__F,__C)
  78. #define __DOCC(name) __DO1(name,__C,__C)
  79.  
  80. __DO2(operator+,__C,__C,__C)
  81. __DO2(operator+,__C,__C,__F)
  82. __DO2(operator+,__C,__F,__C)
  83. __DO2(operator-,__C,__C,__C)
  84. __DO2(operator-,__C,__C,__F)
  85. __DO2(operator-,__C,__F,__C)
  86. __DO2(operator*,__C,__C,__C)
  87. __DO2(operator*,__C,__C,__F)
  88. __DO2(operator*,__C,__F,__C)
  89. __DO2(operator/,__C,__C,__F)
  90. __DO1(operator+,__C,__C)
  91. __DO1(operator-,__C,__C)
  92. __DO2(operator==,__B,__C,__C)
  93. __DO2(operator==,__B,__C,__F)
  94. __DO2(operator==,__B,__F,__C)
  95. __DO2(operator!=,__B,__C,__C)
  96. __DO2(operator!=,__B,__C,__F)
  97. __DO2(operator!=,__B,__F,__C)
  98. __DO1(abs,__F,__C)
  99. __DO1(arg,__F,__C)
  100. __DO2(polar,__C,__F,__F)
  101. __DO1(conj,__C,__C)
  102. __DO1(norm,__F,__C)
  103.  
  104. __DECL2(operator/,__C,__C,__C)
  105. __DECL2(operator/,__C,__F,__C)
  106. __DECL2(pow,__C,__C,__C)
  107. __DECL2(pow,__C,__C,__F)
  108. __DECL2(pow,__C,__C,__I)
  109. __DECL2(pow,__C,__F,__C)
  110. __DECL2(operator>>,__IS,__IS,__CR)
  111. __DECL2(operator<<,__OS,__OS,__C)
  112.  
  113. #undef __DECL2
  114. #undef __DO1
  115. #undef __DO2
  116. #undef __S1
  117. #undef __S2
  118. #undef __D2
  119. #undef __B
  120. #undef __C
  121. #undef __F
  122. #undef __I
  123. #undef __IS
  124. #undef __OS
  125. #undef __CR
  126.