tags 356241 +patch thanks In standard C++, friend functions that are only declared inside a class can only be found by argument-dependent lookup (and can only be defined inline, though it's not a syntax error to fail to do so!)
The attached patch fixes the compilation errors. The warnings about "has virtual functions but non-virtual destructor" appear to be bogus since the destructors in question are protected. These should be suppressed using the "-Wno-non-virtual-dtor" option. There are other remaining warnings which should be investigated. Ben. -- Ben Hutchings We get into the habit of living before acquiring the habit of thinking. - Albert Camus
diff -ur ginac-1.3.3.orig/ginac/archive.h ginac-1.3.3/ginac/archive.h --- ginac-1.3.3.orig/ginac/archive.h 2005-05-01 19:12:42.000000000 +0100 +++ ginac-1.3.3/ginac/archive.h 2006-03-11 03:41:56.492286130 +0000 @@ -45,6 +45,11 @@ /** This class stores all properties needed to record/retrieve the state * of one object of class basic (or a derived class). Each property is * addressed by its name and data type. */ + +class archive_node; +std::ostream &operator<<(std::ostream &os, const archive_node &ar); +std::istream &operator>>(std::istream &is, archive_node &ar); + class archive_node { friend std::ostream &operator<<(std::ostream &os, const archive_node &ar); diff -ur ginac-1.3.3.orig/ginac/ex.h ginac-1.3.3/ginac/ex.h --- ginac-1.3.3.orig/ginac/ex.h 2005-05-01 19:12:42.000000000 +0100 +++ ginac-1.3.3/ginac/ex.h 2006-03-11 03:41:49.992143194 +0000 @@ -63,6 +63,13 @@ * to hold a pointer to the other objects, manage the reference counting and * provide methods for manipulation of these objects. (Some people call such * a thing a proxy class.) */ + +class ex; +bool are_ex_trivially_equal(const ex &, const ex &); +template<class T> const T &ex_to(const ex &); +template<class T> bool is_a(const ex &); +template<class T> bool is_exactly_a(const ex &); + class ex { friend class archive_node; friend inline bool are_ex_trivially_equal(const ex &, const ex &); diff -ur ginac-1.3.3.orig/ginac/function.pl ginac-1.3.3/ginac/function.pl --- ginac-1.3.3.orig/ginac/function.pl 2005-05-01 19:12:43.000000000 +0100 +++ ginac-1.3.3/ginac/function.pl 2006-03-11 03:45:16.398927825 +0000 @@ -385,6 +385,10 @@ class do_taylor {}; +#ifndef __MAKECINT__ +void ginsh_get_ginac_functions(); +#endif // def __MAKECINT__ + /** The class function is used to implement builtin functions like sin, cos... and user defined functions */ class function : public exprseq diff -ur ginac-1.3.3.orig/ginac/indexed.h ginac-1.3.3/ginac/indexed.h --- ginac-1.3.3.orig/ginac/indexed.h 2005-05-19 15:24:35.000000000 +0100 +++ ginac-1.3.3/ginac/indexed.h 2006-03-11 03:38:19.369914383 +0000 @@ -34,6 +34,10 @@ class scalar_products; class symmetry; +ex simplify_indexed(const ex & e, exvector & free_indices, exvector & dummy_indices, const scalar_products & sp); +ex simplify_indexed_product(const ex & e, exvector & free_indices, exvector & dummy_indices, const scalar_products & sp); +bool reposition_dummy_indices(ex & e, exvector & variant_dummy_indices, exvector & moved_indices); + /** This class holds an indexed expression. It consists of a 'base' expression * (the expression being indexed) which can be accessed as op(0), and n (n >= 0) * indices (all of class idx), accessible as op(1)..op(n). */ diff -ur ginac-1.3.3.orig/ginac/ncmul.h ginac-1.3.3/ginac/ncmul.h --- ginac-1.3.3.orig/ginac/ncmul.h 2005-05-01 19:12:43.000000000 +0100 +++ ginac-1.3.3/ginac/ncmul.h 2006-03-11 03:43:39.161748846 +0000 @@ -27,6 +27,9 @@ namespace GiNaC { +ex reeval_ncmul(const exvector & v); +ex hold_ncmul(const exvector & v); + /** Non-commutative product of expressions. */ class ncmul : public exprseq { diff -ur ginac-1.3.3.orig/ginac/symmetry.h ginac-1.3.3/ginac/symmetry.h --- ginac-1.3.3.orig/ginac/symmetry.h 2005-05-01 19:12:43.000000000 +0100 +++ ginac-1.3.3/ginac/symmetry.h 2006-03-11 03:44:47.292765562 +0000 @@ -35,6 +35,10 @@ /** This class describes the symmetry of a group of indices. These objects * can be grouped into a tree to form complex mixed symmetries. */ + +class symmetry; +int canonicalize(exvector::iterator v, const symmetry &symm); + class symmetry : public basic { friend class sy_is_less;
signature.asc
Description: This is a digitally signed message part