]> www.ginac.de Git - ginac.git/commitdiff
added some words of warning to ex_to<>()
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 2 Sep 2003 20:01:55 +0000 (20:01 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 2 Sep 2003 20:01:55 +0000 (20:01 +0000)
ginac/ex.h

index 6132960802d714e8dbb739dee66236ea3197b239..d3c801e2a1839fd9e8995deccdff45614ae76a1a 100644 (file)
@@ -876,7 +876,9 @@ inline bool is_exactly_a(const ex &obj)
 /** 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.
+ *  should generally check the type of e first.  Also, you shouldn't cache
+ *  the returned reference because GiNaC's garbage collector may destroy
+ *  the referenced object any time it's used in another expression.
  *
  *  @param e expression
  *  @return reference to object of class T