03d0f4af2d
* iomanip.h: Use __extension__ for `extern' explicit template instantiations. * sinst.cc: Don't explicitly instantiation string_char_traits<char>. * cinst.cc: Likewiwse, for complex<float>, complex<double>, complex<long double>. * extend.texi: Remove description of extension to explicit instantiation that is now endorsed by standard C++. * decl2.c (grok_array_decl): Add comment. (mark_used): Don't instantiate an explicit instantiation. * friend.c (make_friend_class): Remove bogus comment. Fix check for partial specializations. * pt.c (check_explicit_specialization): Don't SET_DECL_EXPLICIT_INSTANTIATION here. (mark_decl_instantiated): Or here. (do_decl_instantiation): Do it here, instead. Add checks for duplicate explicit instantiations, etc. Tidy. (do_type_instantiation): Likewise. (instantiate_decl): Improve comments. Complain about explicit instantiations where no definition is available. * cp-tree.h (ansi_null_node): Remove. * call.c (build_over_call): Warn about converting NULL to an arithmetic type. * cvt.c (build_expr_type_conversion): Likewise. Use null_ptr_cst_p instead of expanding it inline. * decl.c (ansi_null_node): Remove. (init_decl_processing): Make null_node always have integral type. * except.c (build_throw): Warn about converting NULL to an arithmetic type. * lex.c (init_parse): Remove handling of ansi_null_node. * pt.c (type_unification_real): Don't convert NULL to void* type. * typeck.c (build_binary_op_nodefault): Fix NULL warnings. (convert_for_assignment): Warn about converting NULL to an arithmetic type. (convert_for_initialization): Likewise. From-SVN: r21915
155 lines
2.5 KiB
C++
155 lines
2.5 KiB
C++
// Instantiation file for the -*- C++ -*- complex number classes.
|
|
// Copyright (C) 1994 Free Software Foundation
|
|
|
|
#ifdef F
|
|
typedef float f;
|
|
#endif
|
|
#ifdef D
|
|
typedef double f;
|
|
#endif
|
|
#ifdef LD
|
|
typedef long double f;
|
|
#endif
|
|
|
|
#if defined (MAIN) && defined (__GNUG__)
|
|
#ifdef F
|
|
#pragma implementation "fcomplex"
|
|
#endif
|
|
#ifdef D
|
|
#pragma implementation "dcomplex"
|
|
#endif
|
|
#ifdef LD
|
|
#pragma implementation "ldcomplex"
|
|
#endif
|
|
#endif
|
|
|
|
#if 0
|
|
#define _G_NO_EXTERN_TEMPLATES
|
|
#endif
|
|
#include <std/complext.cc>
|
|
|
|
typedef complex<f> c;
|
|
typedef const c& ccr;
|
|
|
|
#ifdef MAIN
|
|
template c& __doapl (c*, ccr);
|
|
template c& __doaml (c*, ccr);
|
|
template c& __doami (c*, ccr);
|
|
template c& __doadv (c*, ccr);
|
|
#endif
|
|
|
|
#ifdef ADDCC
|
|
template c operator+ (ccr, ccr);
|
|
#endif
|
|
#ifdef ADDCF
|
|
template c operator+ (ccr, f);
|
|
#endif
|
|
#ifdef ADDFC
|
|
template c operator+ (f, ccr);
|
|
#endif
|
|
#ifdef SUBCC
|
|
template c operator- (ccr, ccr);
|
|
#endif
|
|
#ifdef SUBCF
|
|
template c operator- (ccr, f);
|
|
#endif
|
|
#ifdef SUBFC
|
|
template c operator- (f, ccr);
|
|
#endif
|
|
#ifdef MULCC
|
|
template c operator* (ccr, ccr);
|
|
#endif
|
|
#ifdef MULCF
|
|
template c operator* (ccr, f);
|
|
#endif
|
|
#ifdef MULFC
|
|
template c operator* (f, ccr);
|
|
#endif
|
|
#ifdef DIVCC
|
|
template c operator/ (ccr, ccr);
|
|
#endif
|
|
#ifdef DIVCF
|
|
template c operator/ (ccr, f);
|
|
#endif
|
|
#ifdef DIVFC
|
|
template c operator/ (f, ccr);
|
|
#endif
|
|
#ifdef PLUS
|
|
template c operator+ (ccr);
|
|
#endif
|
|
#ifdef MINUS
|
|
template c operator- (ccr);
|
|
#endif
|
|
#ifdef EQCC
|
|
template bool operator== (ccr, ccr);
|
|
#endif
|
|
#ifdef EQCF
|
|
template bool operator== (ccr, f);
|
|
#endif
|
|
#ifdef EQFC
|
|
template bool operator== (f, ccr);
|
|
#endif
|
|
#ifdef NECC
|
|
template bool operator!= (ccr, ccr);
|
|
#endif
|
|
#ifdef NECF
|
|
template bool operator!= (ccr, f);
|
|
#endif
|
|
#ifdef NEFC
|
|
template bool operator!= (f, ccr);
|
|
#endif
|
|
#ifdef ABS
|
|
template f abs (ccr);
|
|
#endif
|
|
#ifdef ARG
|
|
template f arg (ccr);
|
|
#endif
|
|
#ifdef POLAR
|
|
template c polar (f, f);
|
|
#endif
|
|
#ifdef CONJ
|
|
template c conj (ccr);
|
|
#endif
|
|
#ifdef NORM
|
|
template f norm (ccr);
|
|
#endif
|
|
#ifdef COS
|
|
template c cos (ccr);
|
|
#endif
|
|
#ifdef COSH
|
|
template c cosh (ccr);
|
|
#endif
|
|
#ifdef EXP
|
|
template c exp (ccr);
|
|
#endif
|
|
#ifdef LOG
|
|
template c log (ccr);
|
|
#endif
|
|
#ifdef POWCC
|
|
template c pow (ccr, ccr);
|
|
#endif
|
|
#ifdef POWCF
|
|
template c pow (ccr, f);
|
|
#endif
|
|
#ifdef POWCI
|
|
template c pow (ccr, int);
|
|
#endif
|
|
#ifdef POWFC
|
|
template c pow (f, ccr);
|
|
#endif
|
|
#ifdef SIN
|
|
template c sin (ccr);
|
|
#endif
|
|
#ifdef SINH
|
|
template c sinh (ccr);
|
|
#endif
|
|
#ifdef SQRT
|
|
template c sqrt (ccr);
|
|
#endif
|
|
#ifdef EXTRACT
|
|
template istream& operator>> (istream&, complex<f>&);
|
|
#endif
|
|
#ifdef INSERT
|
|
template ostream& operator<< (ostream&, const complex<f>&);
|
|
#endif
|