On Friday, October 12, 2012 23:10:47 Dan wrote: > What is best way to get equivalent of C++ private inheritance > combined with using declarations in the drived to expose some > functionality. For example, suppose I want a basic RateCurve > class that defers almost entirely to type Array as below. The > problem is, once RateCurve is moved to a different module, the > private impl prevents it from working:
You can have the variable be private and alias a function which returns by ref instead of the variable itself. Something like class C { @property ref inout(Impl) get() inout { return _impl; } alias get this; private: Impl _impl; } - Jonathan M Davis