Can you publicly alias a private type?

Trass3r un at known.com
Tue Jun 21 14:16:08 PDT 2011


> Using a templated alias to provide a cleaner public interface to a  
> private implementation that has a more complex interface).

Yep, I also used this feature to restrict instantiations for a template  
function to a known finite set:

private void foo(alias func)()
{
     ...
     func();
     ...
}

public alias foo!f bar;
public alias foo!g bla;


More information about the Digitalmars-d mailing list