lilypond-auto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S)


From: lilypond
Subject: Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T.
Date: Wed, 06 May 2015 22:50:20 +0000


Comment #4 on issue 4365 by address@hidden: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T.
https://code.google.com/p/lilypond/issues/detail?id=4365

Some small part of the motivation for this patch might be coverable by issue 4376. At least the discussion (and followup standard reading) taught me that some uses of dynamic_cast can be resolved at compile time.

Regarding this patch I think I'd prefer just is_smob<T> over ly_is_smob.

With regard to the original conundrum it would have been nice to have something like the reverse of protected: is_smob can be used publicly, but _not_ through inheritance.

One way to get that would likely be to redefine the inheritance as something like

class whatever_translator : public shield<Translator>

and then let shield<class T> derive from T and override the problematic functions with inaccessible ones.

But, uh, I think that's excessive. The solution seems worse than the problem then.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

[Prev in Thread] Current Thread [Next in Thread]