]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4082/1: Reimplement Smobs via templates rather than preprocessor
authorDavid Kastrup <dak@gnu.org>
Mon, 25 Aug 2014 15:46:29 +0000 (17:46 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 1 Sep 2014 13:11:34 +0000 (15:11 +0200)
This creates the underlying code for the new implementation without
converting the bulk of the code (which is left to a script committed
separately).  The include file ly-smobs.icc is removed completely.  A
new file smobs.tcc contains generic template instantiations.  The GCC
implementation works by loading it unconditionally in smobs.hh.
Depending on the underlying template mechanism, it might be feasible to
include it into just one compilation unit.

Where the previous implementation referred to class names passed into
macros, the typeinfo mechanism of C++ is employed for deriving the
respective name.  The GCC implementation uses some cursory demangling of
the resulting type id, converting "3Box" into "Box" and similarly.
Other APIs might warrant different polishing but the type names are
mostly used for internal purposes and differences are not all that
problematic.


No differences found