On 2015/05/01 00:44:45, dak wrote:
I am not going to put in an explanation for every definition of
equal_p for some
smob class.
OK, that makes sense now.
> invoked as T* t = ly_unsmob<T>(target);
I don't think that warrants a template function of its own. It just
makes
matters murkier without saving a significant amount of typing.
Then we'll differ. Repeating the type three times on a line is twice more than I like. (With C++11 it could be auto t = ly_unsmob<T>(target).) But deferring to your judgment, what is your opinion of static Engraver *unsmob (SCM eng) { return dynamic_cast<Engraver *> (Translator::unsmob (eng)); } and eight similar cases I can find which go about saving a small amount of typing independently? https://codereview.appspot.com/235790043/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel