From 6190dc53dc063d142183dc5e117b031624911199 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Tue, 2 Sep 2003 20:01:55 +0000 Subject: [PATCH] added some words of warning to ex_to<>() --- ginac/ex.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ginac/ex.h b/ginac/ex.h index 61329608..d3c801e2 100644 --- a/ginac/ex.h +++ b/ginac/ex.h @@ -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 -- 2.49.0