From: Richard Kreckel Date: Mon, 14 Aug 2000 16:21:06 +0000 (+0000) Subject: - Inserted some more std:: to make it compile under GCC2.96. X-Git-Tag: release_0-7-0~36 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=9e2d60e206395fc9908e1f9025e50c76b3d7c182;ds=sidebyside - Inserted some more std:: to make it compile under GCC2.96. --- diff --git a/ginac/add.cpp b/ginac/add.cpp index fa421530..2b1c5d77 100644 --- a/ginac/add.cpp +++ b/ginac/add.cpp @@ -567,7 +567,7 @@ unsigned add::precedence = 40; ////////// const add some_add; -const type_info & typeid_add = typeid(some_add); +const std::type_info & typeid_add = typeid(some_add); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/add.h b/ginac/add.h index 4e63665d..e5c687b9 100644 --- a/ginac/add.h +++ b/ginac/add.h @@ -108,7 +108,7 @@ protected: // global constants extern const add some_add; -extern const type_info & typeid_add; +extern const std::type_info & typeid_add; // utility functions inline const add &ex_to_add(const ex &e) diff --git a/ginac/archive.cpp b/ginac/archive.cpp index 171766c9..ff8e755f 100644 --- a/ginac/archive.cpp +++ b/ginac/archive.cpp @@ -224,7 +224,7 @@ std::ostream &operator<<(std::ostream &os, const archive &ar) unsigned int num_atoms = ar.atoms.size(); write_unsigned(os, num_atoms); for (unsigned int i=0; i::const_iterator i = atoms.begin(), iend = atoms.end(); archive_atom id = 0; while (i != iend) { - os << " " << id << " " << *i << endl; + os << " " << id << " " << *i << std::endl; i++; id++; } } - os << endl; + os << std::endl; // Dump expressions os << "Expressions:\n"; @@ -538,11 +538,11 @@ void archive::printraw(std::ostream &os) const std::vector::const_iterator i = exprs.begin(), iend = exprs.end(); unsigned int index = 0; while (i != iend) { - os << " " << index << " \"" << unatomize(i->name) << "\" root node " << i->root << endl; + os << " " << index << " \"" << unatomize(i->name) << "\" root node " << i->root << std::endl; i++; index++; } } - os << endl; + os << std::endl; // Dump nodes os << "Nodes:\n"; @@ -577,7 +577,7 @@ void archive_node::printraw(std::ostream &os) const case PTYPE_NODE: os << "node"; break; default: os << ""; break; } - os << " \"" << a.unatomize(i->name) << "\" " << i->value << endl; + os << " \"" << a.unatomize(i->name) << "\" " << i->value << std::endl; i++; } } diff --git a/ginac/basic.cpp b/ginac/basic.cpp index 8dcf5843..6d1f18a3 100644 --- a/ginac/basic.cpp +++ b/ginac/basic.cpp @@ -538,7 +538,7 @@ unsigned basic::delta_indent = 4; ////////// const basic some_basic; -const type_info & typeid_basic=typeid(some_basic); +const std::type_info & typeid_basic = typeid(some_basic); ////////// // global variables diff --git a/ginac/basic.h b/ginac/basic.h index eb30fd19..3a604b5d 100644 --- a/ginac/basic.h +++ b/ginac/basic.h @@ -185,7 +185,7 @@ private: // global constants extern const basic some_basic; -extern const type_info & typeid_basic; +extern const std::type_info & typeid_basic; // global variables diff --git a/ginac/clifford.cpp b/ginac/clifford.cpp index 02aff19b..fc6604dc 100644 --- a/ginac/clifford.cpp +++ b/ginac/clifford.cpp @@ -212,7 +212,7 @@ unsigned clifford::next_serial=0; ////////// const clifford some_clifford; -const type_info & typeid_clifford=typeid(some_clifford); +const std::type_info & typeid_clifford = typeid(some_clifford); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/clifford.h b/ginac/clifford.h index efb813de..80c13422 100644 --- a/ginac/clifford.h +++ b/ginac/clifford.h @@ -84,7 +84,7 @@ private: // global constants extern const clifford some_clifford; -extern const type_info & typeid_clifford; +extern const std::type_info & typeid_clifford; // utility functions inline const clifford &ex_to_clifford(const ex &e) diff --git a/ginac/color.cpp b/ginac/color.cpp index 34c3a85f..ca978963 100644 --- a/ginac/color.cpp +++ b/ginac/color.cpp @@ -652,7 +652,7 @@ bool color::all_of_type_coloridx(void) const ////////// const color some_color; -const type_info & typeid_color=typeid(some_color); +const std::type_info & typeid_color = typeid(some_color); ////////// // friend functions diff --git a/ginac/color.h b/ginac/color.h index 299b3be8..0812dce8 100644 --- a/ginac/color.h +++ b/ginac/color.h @@ -134,7 +134,7 @@ protected: // global constants extern const color some_color; -extern const type_info & typeid_color; +extern const std::type_info & typeid_color; // global functions inline const color &ex_to_color(const ex &e) diff --git a/ginac/coloridx.cpp b/ginac/coloridx.cpp index b3a409a2..4831aada 100644 --- a/ginac/coloridx.cpp +++ b/ginac/coloridx.cpp @@ -239,7 +239,7 @@ bool coloridx::info(unsigned inf) const ////////// const coloridx some_coloridx; -const type_info & typeid_coloridx=typeid(some_coloridx); +const std::type_info & typeid_coloridx = typeid(some_coloridx); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/coloridx.h b/ginac/coloridx.h index 37b82143..23d806b0 100644 --- a/ginac/coloridx.h +++ b/ginac/coloridx.h @@ -78,7 +78,7 @@ public: // global constants extern const coloridx some_coloridx; -extern const type_info & typeid_coloridx; +extern const std::type_info & typeid_coloridx; // utility functions inline const coloridx &ex_to_coloridx(const ex &e) diff --git a/ginac/constant.cpp b/ginac/constant.cpp index 25efe773..60ccc6a1 100644 --- a/ginac/constant.cpp +++ b/ginac/constant.cpp @@ -235,7 +235,7 @@ unsigned constant::next_serial=0; ////////// const constant some_constant; -const type_info & typeid_constant=typeid(some_constant); +const std::type_info & typeid_constant = typeid(some_constant); /** Pi. (3.14159...) Diverts straight into CLN for evalf(). */ const constant Pi("Pi", PiEvalf); diff --git a/ginac/constant.h b/ginac/constant.h index 47f2a9d6..f8c5633d 100644 --- a/ginac/constant.h +++ b/ginac/constant.h @@ -90,7 +90,7 @@ private: // global constants extern const constant some_constant; -extern const type_info & typeid_constant; +extern const std::type_info & typeid_constant; extern const constant Pi; extern const constant Catalan; diff --git a/ginac/container.pl b/ginac/container.pl index f642e411..114da652 100755 --- a/ginac/container.pl +++ b/ginac/container.pl @@ -255,7 +255,7 @@ protected: // global constants extern const ${CONTAINER} some_${CONTAINER}; -extern const type_info & typeid_${CONTAINER}; +extern const std::type_info & typeid_${CONTAINER}; // utility functions inline const ${CONTAINER} &ex_to_${CONTAINER}(const ex &e) @@ -793,7 +793,7 @@ unsigned ${CONTAINER}::precedence=10; ////////// const ${CONTAINER} some_${CONTAINER}; -const type_info & typeid_${CONTAINER}=typeid(some_${CONTAINER}); +const std::type_info & typeid_${CONTAINER} = typeid(some_${CONTAINER}); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp index 5a52efe1..f7966396 100644 --- a/ginac/expairseq.cpp +++ b/ginac/expairseq.cpp @@ -1522,16 +1522,16 @@ bool expairseq::is_canonical() const // double test makes it easier to set a breakpoint... if (!is_ex_exactly_of_type((*it_last).rest,numeric)|| !is_ex_exactly_of_type((*it).rest,numeric)) { - printpair(cout,*it_last,0); - cout << ">"; - printpair(cout,*it,0); - cout << "\n"; - cout << "pair1:" << std::endl; - (*it_last).rest.printtree(cout); - (*it_last).coeff.printtree(cout); - cout << "pair2:" << std::endl; - (*it).rest.printtree(cout); - (*it).coeff.printtree(cout); + printpair(std::clog,*it_last,0); + std::clog << ">"; + printpair(std::clog,*it,0); + std::clog << "\n"; + std::clog << "pair1:" << std::endl; + (*it_last).rest.printtree(std::clog); + (*it_last).coeff.printtree(std::clog); + std::clog << "pair2:" << std::endl; + (*it).rest.printtree(std::clog); + (*it).coeff.printtree(std::clog); return 0; } } @@ -1734,7 +1734,7 @@ unsigned expairseq::hashtabfactor=1; ////////// const expairseq some_expairseq; -const type_info & typeid_expairseq=typeid(some_expairseq); +const std::type_info & typeid_expairseq = typeid(some_expairseq); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/expairseq.h b/ginac/expairseq.h index ee7ddbd3..a1edba11 100644 --- a/ginac/expairseq.h +++ b/ginac/expairseq.h @@ -197,7 +197,7 @@ protected: // global constants extern const expairseq some_expairseq; -extern const type_info & typeid_expairseq; +extern const std::type_info & typeid_expairseq; // utility functions inline const expairseq &ex_to_expairseq(const ex &e) diff --git a/ginac/fail.cpp b/ginac/fail.cpp index 2cea9eb1..7205f129 100644 --- a/ginac/fail.cpp +++ b/ginac/fail.cpp @@ -160,7 +160,7 @@ int fail::compare_same_type(const basic & other) const ////////// const fail some_fail; -const type_info & typeid_fail=typeid(some_fail); +const std::type_info & typeid_fail = typeid(some_fail); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/fail.h b/ginac/fail.h index c7a80a7e..ab313b2c 100644 --- a/ginac/fail.h +++ b/ginac/fail.h @@ -69,7 +69,7 @@ protected: // global constants extern const fail some_fail; -extern const type_info & typeid_fail; +extern const std::type_info & typeid_fail; #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/function.pl b/ginac/function.pl index c6e00834..b583a76b 100755 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -467,7 +467,7 @@ inline const function &ex_to_function(const ex &e) // global constants extern const function some_function; -extern const type_info & typeid_function; +extern const std::type_info & typeid_function; #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC @@ -1081,7 +1081,7 @@ unsigned function::find_function(const std::string &name, unsigned nparams) ////////// const function some_function; -const type_info & typeid_function=typeid(some_function); +const std::type_info & typeid_function=typeid(some_function); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/idx.cpp b/ginac/idx.cpp index 08b982c3..da410a21 100644 --- a/ginac/idx.cpp +++ b/ginac/idx.cpp @@ -373,7 +373,7 @@ unsigned idx::next_serial=0; ////////// const idx some_idx; -const type_info & typeid_idx=typeid(some_idx); +const std::type_info & typeid_idx = typeid(some_idx); ////////// // other functions diff --git a/ginac/idx.h b/ginac/idx.h index 3ab440e9..ea19e752 100644 --- a/ginac/idx.h +++ b/ginac/idx.h @@ -94,7 +94,7 @@ protected: // global constants extern const idx some_idx; -extern const type_info & typeid_idx; +extern const std::type_info & typeid_idx; // utility functions inline const idx &ex_to_idx(const ex &e) diff --git a/ginac/indexed.cpp b/ginac/indexed.cpp index 8151b080..ac5eb576 100644 --- a/ginac/indexed.cpp +++ b/ginac/indexed.cpp @@ -332,7 +332,7 @@ bool indexed::all_of_type_idx(void) const ////////// const indexed some_indexed; -const type_info & typeid_indexed=typeid(some_indexed); +const std::type_info & typeid_indexed = typeid(some_indexed); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/indexed.h b/ginac/indexed.h index 03dfa77a..44021b8e 100644 --- a/ginac/indexed.h +++ b/ginac/indexed.h @@ -91,7 +91,7 @@ protected: // global constants extern const indexed some_indexed; -extern const type_info & typeid_indexed; +extern const std::type_info & typeid_indexed; // utility functions inline const indexed &ex_to_indexed(const ex &e) diff --git a/ginac/inifcns.cpp b/ginac/inifcns.cpp index 6541af42..9ce90672 100644 --- a/ginac/inifcns.cpp +++ b/ginac/inifcns.cpp @@ -489,7 +489,7 @@ ex lsolve(const ex &eqns, const ex &symbols) matrix solution; try { solution = sys.solve(vars,rhs); - } catch (const runtime_error & e) { + } catch (const std::runtime_error & e) { // Probably singular matrix or otherwise overdetermined system: // It is consistent to return an empty list return lst(); diff --git a/ginac/inifcns_gamma.cpp b/ginac/inifcns_gamma.cpp index ae12074e..3ba8bb46 100644 --- a/ginac/inifcns_gamma.cpp +++ b/ginac/inifcns_gamma.cpp @@ -105,7 +105,6 @@ static ex lgamma_series(const ex & arg, ex recur; for (numeric p; p<=m; ++p) recur += log(arg+p); - cout << recur << endl; return (lgamma(arg+m+_ex1())-recur).series(rel, order, options); } diff --git a/ginac/input_lexer.h b/ginac/input_lexer.h index 4bb38f9e..db3e6226 100644 --- a/ginac/input_lexer.h +++ b/ginac/input_lexer.h @@ -50,7 +50,7 @@ namespace GiNaC { class ex; /** Set the input string to be parsed by ginac_yyparse() (used internally). */ -extern void set_lexer_string(const string &s); +extern void set_lexer_string(const std::string &s); /** Set the list of predefined symbols for the lexer (used internally). */ extern void set_lexer_symbols(ex l); diff --git a/ginac/input_parser.yy b/ginac/input_parser.yy index 0bec16c7..3fa82c12 100644 --- a/ginac/input_parser.yy +++ b/ginac/input_parser.yy @@ -49,7 +49,7 @@ namespace GiNaC { ex parsed_ex; // Last error message returned by parser -static string parser_error; +static std::string parser_error; %} /* Tokens (T_LITERAL means a literal value returned by the parser, but not @@ -78,8 +78,8 @@ input : exp { try { parsed_ex = $1; YYACCEPT; - } catch (exception &e) { - parser_error = e.what(); + } catch (std::exception &err) { + parser_error = err.what(); YYERROR; } } @@ -146,7 +146,7 @@ row : exp {$$ = lst($1);} %% // Get last error encountered by parser -string get_parser_error(void) +std::string get_parser_error(void) { return parser_error; } @@ -160,5 +160,5 @@ using GiNaC::parser_error; // Error print routine (store error string in parser_error) int ginac_yyerror(char *s) { - parser_error = string(s) + " at " + string(ginac_yytext); + parser_error = std::string(s) + " at " + std::string(ginac_yytext); } diff --git a/ginac/isospin.cpp b/ginac/isospin.cpp index b46ecb0e..0eefc121 100644 --- a/ginac/isospin.cpp +++ b/ginac/isospin.cpp @@ -249,7 +249,7 @@ unsigned isospin::next_serial=0; ////////// const isospin some_isospin; -const type_info & typeid_isospin=typeid(some_isospin); +const std::type_info & typeid_isospin = typeid(some_isospin); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/isospin.h b/ginac/isospin.h index da77efa4..b5edbb0d 100644 --- a/ginac/isospin.h +++ b/ginac/isospin.h @@ -85,7 +85,7 @@ private: // global constants extern const isospin some_isospin; -extern const type_info & typeid_isospin; +extern const std::type_info & typeid_isospin; // utility functions inline const isospin &ex_to_isospin(const ex &e) diff --git a/ginac/lorentzidx.cpp b/ginac/lorentzidx.cpp index 91fc6d9e..584a5d0e 100644 --- a/ginac/lorentzidx.cpp +++ b/ginac/lorentzidx.cpp @@ -293,7 +293,7 @@ lorentzidx lorentzidx::create_anonymous_representative(void) const ////////// const lorentzidx some_lorentzidx; -const type_info & typeid_lorentzidx=typeid(some_lorentzidx); +const std::type_info & typeid_lorentzidx = typeid(some_lorentzidx); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/lorentzidx.h b/ginac/lorentzidx.h index f7aa397b..25cab856 100644 --- a/ginac/lorentzidx.h +++ b/ginac/lorentzidx.h @@ -85,7 +85,7 @@ protected: // global constants extern const lorentzidx some_lorentzidx; -extern const type_info & typeid_lorentzidx; +extern const std::type_info & typeid_lorentzidx; // utility functions inline const lorentzidx &ex_to_lorentzidx(const ex &e) diff --git a/ginac/lortensor.cpp b/ginac/lortensor.cpp index 2b797efb..feccd226 100644 --- a/ginac/lortensor.cpp +++ b/ginac/lortensor.cpp @@ -493,7 +493,7 @@ ex Dim(void) ////////// const lortensor some_lortensor; -const type_info & typeid_lortensor=typeid(some_lortensor); +const std::type_info & typeid_lortensor = typeid(some_lortensor); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/lortensor.h b/ginac/lortensor.h index 8d85df81..a5fdb5d1 100644 --- a/ginac/lortensor.h +++ b/ginac/lortensor.h @@ -123,7 +123,7 @@ private: // global constants extern const lortensor some_lortensor; -extern const type_info & typeid_lortensor; +extern const std::type_info & typeid_lortensor; // utility functions diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index 8b747e85..3e0eeaf8 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -1219,7 +1219,7 @@ ex lst_to_matrix(const ex &l) ////////// const matrix some_matrix; -const type_info & typeid_matrix=typeid(some_matrix); +const std::type_info & typeid_matrix = typeid(some_matrix); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/matrix.h b/ginac/matrix.h index 37dffa42..e3916e2a 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -111,7 +111,7 @@ protected: // global constants extern const matrix some_matrix; -extern const type_info & typeid_matrix; +extern const std::type_info & typeid_matrix; // wrapper functions around member functions @@ -119,16 +119,16 @@ extern const type_info & typeid_matrix; inline unsigned nops(const matrix & m) { return m.nops(); } -inline ex expand(const matrix & m, unsigned options=0) +inline ex expand(const matrix & m, unsigned options = 0) { return m.expand(options); } inline bool has(const matrix & m, const ex & other) { return m.has(other); } -inline ex eval(const matrix & m, int level=0) +inline ex eval(const matrix & m, int level = 0) { return m.eval(level); } -inline ex evalf(const matrix & m, int level=0) +inline ex evalf(const matrix & m, int level = 0) { return m.evalf(level); } inline unsigned rows(const matrix & m) diff --git a/ginac/mul.cpp b/ginac/mul.cpp index 3e257e62..ee00dd4e 100644 --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -784,7 +784,7 @@ unsigned mul::precedence = 50; ////////// const mul some_mul; -const type_info & typeid_mul = typeid(some_mul); +const std::type_info & typeid_mul = typeid(some_mul); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/mul.h b/ginac/mul.h index 8358b57d..93ac7b0d 100644 --- a/ginac/mul.h +++ b/ginac/mul.h @@ -115,7 +115,7 @@ protected: // global constants extern const mul some_mul; -extern const type_info & typeid_mul; +extern const std::type_info & typeid_mul; // utility functions inline const mul &ex_to_mul(const ex &e) diff --git a/ginac/ncmul.cpp b/ginac/ncmul.cpp index d8e7584b..cf4f6246 100644 --- a/ginac/ncmul.cpp +++ b/ginac/ncmul.cpp @@ -632,7 +632,7 @@ unsigned ncmul::precedence=50; ////////// const ncmul some_ncmul; -const type_info & typeid_ncmul=typeid(some_ncmul); +const std::type_info & typeid_ncmul = typeid(some_ncmul); ////////// // friend functions diff --git a/ginac/ncmul.h b/ginac/ncmul.h index ed1b2997..fac40b6f 100644 --- a/ginac/ncmul.h +++ b/ginac/ncmul.h @@ -105,7 +105,7 @@ protected: // global constants extern const ncmul some_ncmul; -extern const type_info & typeid_ncmul; +extern const std::type_info & typeid_ncmul; // friend funtions diff --git a/ginac/normal.cpp b/ginac/normal.cpp index 0e1a0bfa..1cbb8773 100644 --- a/ginac/normal.cpp +++ b/ginac/normal.cpp @@ -196,7 +196,7 @@ static void get_symbol_stats(const ex &a, const ex &b, sym_desc_vec &v) int deg_b = b.degree(*(it->sym)); it->deg_a = deg_a; it->deg_b = deg_b; - it->max_deg = max(deg_a, deg_b); + it->max_deg = std::max(deg_a,deg_b); it->ldeg_a = a.ldegree(*(it->sym)); it->ldeg_b = b.ldegree(*(it->sym)); it++; @@ -1353,10 +1353,11 @@ static ex heur_gcd(const ex &a, const ex &b, ex *ca, ex *cb, sym_desc_vec::const numeric rgc = gc.inverse(); ex p = a * rgc; ex q = b * rgc; - int maxdeg = max(p.degree(x), q.degree(x)); - + int maxdeg = std::max(p.degree(x),q.degree(x)); + // Find evaluation point - numeric mp = p.max_coefficient(), mq = q.max_coefficient(); + numeric mp = p.max_coefficient(); + numeric mq = q.max_coefficient(); numeric xi; if (mp > mq) xi = mq * _num2() + _num2(); @@ -1595,7 +1596,7 @@ factored_b: // Cancel trivial common factor int ldeg_a = var->ldeg_a; int ldeg_b = var->ldeg_b; - int min_ldeg = min(ldeg_a, ldeg_b); + int min_ldeg = std::min(ldeg_a,ldeg_b); if (min_ldeg > 0) { ex common = power(x, min_ldeg); //std::clog << "trivial common factor " << common << endl; diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index 228540d7..258a4b1c 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -1212,7 +1212,7 @@ unsigned numeric::precedence = 30; ////////// const numeric some_numeric; -const type_info & typeid_numeric=typeid(some_numeric); +const std::type_info & typeid_numeric = typeid(some_numeric); /** Imaginary unit. This is not a constant but a numeric since we are * natively handing complex numbers anyways. */ const numeric I = numeric(::complex(cl_I(0),cl_I(1))); diff --git a/ginac/numeric.h b/ginac/numeric.h index 25cf91e6..ff1c27d8 100644 --- a/ginac/numeric.h +++ b/ginac/numeric.h @@ -207,7 +207,7 @@ protected: extern const numeric some_numeric; extern const numeric I; -extern const type_info & typeid_numeric; +extern const std::type_info & typeid_numeric; extern _numeric_digits Digits; //#define is_a_numeric_hash(x) ((x)==HASHVALUE_NUMERIC) diff --git a/ginac/power.cpp b/ginac/power.cpp index 0bef15c4..53342a9e 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -845,7 +845,7 @@ unsigned power::precedence = 60; ////////// const power some_power; -const type_info & typeid_power=typeid(some_power); +const std::type_info & typeid_power=typeid(some_power); // helper function diff --git a/ginac/power.h b/ginac/power.h index 08c8a75a..4d93741f 100644 --- a/ginac/power.h +++ b/ginac/power.h @@ -108,7 +108,7 @@ protected: // global constants extern const power some_power; -extern const type_info & typeid_power; +extern const std::type_info & typeid_power; // utility functions inline const power &ex_to_power(const ex &e) diff --git a/ginac/pseries.cpp b/ginac/pseries.cpp index 94bdb558..9dc0921e 100644 --- a/ginac/pseries.cpp +++ b/ginac/pseries.cpp @@ -894,7 +894,7 @@ ex ex::series(const ex & r, int order, unsigned options) const // Global constants const pseries some_pseries; -const type_info & typeid_pseries = typeid(some_pseries); +const std::type_info & typeid_pseries = typeid(some_pseries); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/pseries.h b/ginac/pseries.h index eb0ef77d..cdae3caa 100644 --- a/ginac/pseries.h +++ b/ginac/pseries.h @@ -99,7 +99,7 @@ protected: // global constants extern const pseries some_pseries; -extern const type_info & typeid_pseries; +extern const std::type_info & typeid_pseries; /** Return a reference to the pseries object embedded in an expression. * The result is undefined if the expression does not contain a pseries diff --git a/ginac/relational.cpp b/ginac/relational.cpp index a03b60f8..f34825f4 100644 --- a/ginac/relational.cpp +++ b/ginac/relational.cpp @@ -401,7 +401,7 @@ unsigned relational::precedence=20; ////////// const relational some_relational; -const type_info & typeid_relational=typeid(some_relational); +const std::type_info & typeid_relational = typeid(some_relational); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/relational.h b/ginac/relational.h index c9c0eb68..c1077f15 100644 --- a/ginac/relational.h +++ b/ginac/relational.h @@ -102,7 +102,7 @@ protected: // global constants extern const relational some_relational; -extern const type_info & typeid_relational; +extern const std::type_info & typeid_relational; // utility functions inline const relational &ex_to_relational(const ex &e) diff --git a/ginac/simp_lor.cpp b/ginac/simp_lor.cpp index e589b18f..6e5fbdab 100644 --- a/ginac/simp_lor.cpp +++ b/ginac/simp_lor.cpp @@ -314,7 +314,7 @@ bool simp_lor::all_of_type_lorentzidx(void) const ////////// const simp_lor some_simp_lor; -const type_info & typeid_simp_lor = typeid(some_simp_lor); +const std::type_info & typeid_simp_lor = typeid(some_simp_lor); ////////// // friend functions @@ -500,8 +500,8 @@ void scalar_products::debugprint(void) const const spmapkey & k=(*cit).first; std::cerr << "item key=((" << k.first.first << "," << k.first.second << "),"; - k.second.printraw(cerr); - cerr << ") value=" << (*cit).second << std::endl; + k.second.printraw(std::cerr); + std::cerr << ") value=" << (*cit).second << std::endl; } } diff --git a/ginac/simp_lor.h b/ginac/simp_lor.h index 4f5c49f5..1d68eee7 100644 --- a/ginac/simp_lor.h +++ b/ginac/simp_lor.h @@ -62,7 +62,7 @@ public: } }; -typedef map spmap; +typedef std::map spmap; class simp_lor; @@ -154,7 +154,7 @@ protected: // global constants extern const simp_lor some_simp_lor; -extern const type_info & typeid_simp_lor; +extern const std::type_info & typeid_simp_lor; // utility functions inline const simp_lor &ex_to_simp_lor(const ex &e) diff --git a/ginac/structure.cpp b/ginac/structure.cpp index fe3c1c51..06d07fb7 100644 --- a/ginac/structure.cpp +++ b/ginac/structure.cpp @@ -176,7 +176,7 @@ unsigned structure::register_new(const char * nm) ////////// const structure some_structure; -const type_info & typeid_structure=typeid(some_structure); +const std::type_info & typeid_structure = typeid(some_structure); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/structure.h b/ginac/structure.h index 972e1123..43828191 100644 --- a/ginac/structure.h +++ b/ginac/structure.h @@ -84,7 +84,7 @@ public: // global constants extern const structure some_structure; -extern const type_info & typeid_structure; +extern const std::type_info & typeid_structure; #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/symbol.cpp b/ginac/symbol.cpp index 15f1f002..96216625 100644 --- a/ginac/symbol.cpp +++ b/ginac/symbol.cpp @@ -357,7 +357,7 @@ unsigned symbol::next_serial=0; ////////// const symbol some_symbol; -const type_info & typeid_symbol=typeid(some_symbol); +const std::type_info & typeid_symbol = typeid(some_symbol); ////////// // subclass assigned_ex_info diff --git a/ginac/symbol.h b/ginac/symbol.h index 3c8c8557..a3fc915f 100644 --- a/ginac/symbol.h +++ b/ginac/symbol.h @@ -115,7 +115,7 @@ private: // global constants extern const symbol some_symbol; -extern const type_info & typeid_symbol; +extern const std::type_info & typeid_symbol; // utility functions inline const symbol &ex_to_symbol(const ex &e)