]> www.ginac.de Git - ginac.git/commit
is_exactly_a: use typeid() to check the type of expression.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 15 Oct 2008 11:32:11 +0000 (15:32 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Sun, 19 Oct 2008 17:29:11 +0000 (21:29 +0400)
commite9b5729311fcd5572d806f5df2e645e1845603e5
tree42cd2d8bac68e158075282619a68e101e8fb6886
parentce9053c15affb2a1a99d1157b85266d70aec601b
is_exactly_a: use typeid() to check the type of expression.

Custom RTTI considered harmful, part 1.

Custom run time type information (RTTI) system implemented in GiNaC have
several serious drawbacks, such as

1. It makes writing GiNaC classes unnecessary cumbersome.
2. It wastes sizeof(void *) bytes per object, for small objects like
   symbol, numeric, etc. this overhead is considerable.

It turns out that GiNaC's RTTI is not any faster than the standard one
(at least on GNU/Linux and Solaris with GNU C++ library and compiler).
So, GiNaC RTTI have no reasons to exit any more.
ginac/basic.h
ginac/symbol.h