]> www.ginac.de Git - ginac.git/commitdiff
some (trivial) fixes for gcc 3.4
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 17 Jul 2003 20:19:57 +0000 (20:19 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 17 Jul 2003 20:19:57 +0000 (20:19 +0000)
check/exam_inifcns.cpp
check/exam_pseries.cpp
check/time_antipode.cpp
ginac/basic.h
ginac/ex.h
ginac/function.pl

index 1291030a3827fa549eceb87abb1702082511a458..c222eddf01b575f3f3544b60e9ce541681fa1888 100644 (file)
@@ -26,6 +26,8 @@
 /* Assorted tests on other transcendental functions. */
 static unsigned inifcns_consist_trans(void)
 {
+       using GiNaC::asin; using GiNaC::acos;
+
        unsigned result = 0;
        symbol x("x");
        ex chk;
@@ -163,6 +165,8 @@ static unsigned inifcns_consist_gamma(void)
    arguments where the result exists in closed form and check if it's ok. */
 static unsigned inifcns_consist_psi(void)
 {
+       using GiNaC::log;
+
        unsigned result = 0;
        symbol x;
        ex e, f;
index a5d9c4fd78d1dbc1aec8d9788315ec58511fda8a..87cea8e92584844b25afa611819bc0f7eae231a8 100644 (file)
@@ -41,6 +41,8 @@ static unsigned check_series(const ex &e, const ex &point, const ex &d, int orde
 // Series expansion
 static unsigned exam_series1(void)
 {
+       using GiNaC::log;
+
        unsigned result = 0;
        ex e, d;
        
@@ -233,6 +235,8 @@ static unsigned exam_series9(void)
 // Series expansion of Li2((x==2)^2), caring about branch-cut
 static unsigned exam_series10(void)
 {
+       using GiNaC::log;
+
        ex e = Li2(pow(x,2));
        ex d = Li2(4) + (-log(3) + I*Pi*csgn(I-I*pow(x,2))) * (x-2)
               + (numeric(-2,3) + log(3)/4 - I*Pi/4*csgn(I-I*pow(x,2))) * pow(x-2,2)
@@ -245,6 +249,8 @@ static unsigned exam_series10(void)
 // Series expansion of logarithms around branch points
 static unsigned exam_series11(void)
 {
+       using GiNaC::log;
+
        unsigned result = 0;
        ex e, d;
        symbol a("a");
@@ -285,6 +291,8 @@ static unsigned exam_series11(void)
 // Series expansion of other functions around branch points
 static unsigned exam_series12(void)
 {
+       using GiNaC::log;
+
        unsigned result = 0;
        ex e, d;
        
index 09870db838d8d2bb2c3a61d7f035bf0e85b64ef8..30aaacbc1343b785e503075a6eb232cd95716fe5 100644 (file)
@@ -442,9 +442,9 @@ static const node tree6(unsigned cuts=0)
                        bool(cuts & 16)));
 }
 
-static unsigned test_tree(const node (*tree_generator)(unsigned=0))
+static unsigned test_tree(const node tree_generator(unsigned))
 {
-       const int edges = tree_generator().total_edges();
+       const int edges = tree_generator(0).total_edges();
        const int vertices = edges+1;
        
        // fill a vector of all possible 2^edges combinations of cuts...
index c68234f3e6a352e8a511f4b1043166c0cdb49219..264462f9d22ecb44d97a972a17ac51de1cafe8d0 100644 (file)
@@ -188,35 +188,6 @@ inline bool is_exactly_a(const class basic &obj)
        const T foo; return foo.tinfo()==obj.tinfo();
 }
 
-/** Check if ex is a handle to a T, including base classes. */
-template <class T>
-inline bool is_a(const ex &obj)
-{
-       return is_a<T>(*obj.bp);
-}
-
-/** Check if ex is a handle to a T, not including base classes. */
-template <class T>
-inline bool is_exactly_a(const ex &obj)
-{
-       return is_exactly_a<T>(*obj.bp);
-}
-
-/** Return a reference to the basic-derived class T object embedded in an
- *  expression.  This is fast but unsafe: the result is undefined if the
- *  expression does not contain a T object at its top level.  Hence, you
- *  should generally check the type of e first.
- *
- *  @param e expression
- *  @return reference to pseries object
- *  @see is_exactly_a<class T>() */
-template <class T>
-inline const T &ex_to(const ex &e)
-{
-       GINAC_ASSERT(is_a<T>(e));
-       return static_cast<const T &>(*e.bp);
-}
-
 } // namespace GiNaC
 
 #endif // ndef __GINAC_BASIC_H__
index 3c8094b1b405b1717f5cc05ce8ae74f0563055a7..4f1074d978dc47b9bead9a52293600b12feaa16d 100644 (file)
@@ -546,6 +546,36 @@ inline ex ex::map(ex (*f)(const ex & e)) const
        return bp->map(fcn);
 }
 
+// convenience type checker template functions
+
+/** Check if ex is a handle to a T, including base classes. */
+template <class T>
+inline bool is_a(const ex &obj)
+{
+       return is_a<T>(*obj.bp);
+}
+
+/** Check if ex is a handle to a T, not including base classes. */
+template <class T>
+inline bool is_exactly_a(const ex &obj)
+{
+       return is_exactly_a<T>(*obj.bp);
+}
+
+/** Return a reference to the basic-derived class T object embedded in an
+ *  expression.  This is fast but unsafe: the result is undefined if the
+ *  expression does not contain a T object at its top level.  Hence, you
+ *  should generally check the type of e first.
+ *
+ *  @param e expression
+ *  @return reference to object of class T
+ *  @see is_exactly_a<class T>() */
+template <class T>
+inline const T &ex_to(const ex &e)
+{
+       GINAC_ASSERT(is_a<T>(e));
+       return static_cast<const T &>(*e.bp);
+}
 
 } // namespace GiNaC
 
index 78deea4b41a64135997e80443c1aa6312b527d9f..d3378e339294b050d2c61aed0e064dfa206cba84 100755 (executable)
@@ -1004,12 +1004,12 @@ std::vector<function_options> & function::registered_functions(void)
 
 bool function::lookup_remember_table(ex & result) const
 {
-       return remember_table::remember_tables()[serial].lookup_entry(*this,result);
+       return remember_table::remember_tables()[this->serial].lookup_entry(*this,result);
 }
 
 void function::store_remember_table(ex const & result) const
 {
-       remember_table::remember_tables()[serial].add_entry(*this,result);
+       remember_table::remember_tables()[this->serial].add_entry(*this,result);
 }
 
 // public